Whamcloud - gitweb
- update from HEAD
authoralex <alex>
Wed, 9 Dec 2009 20:07:54 +0000 (20:07 +0000)
committeralex <alex>
Wed, 9 Dec 2009 20:07:54 +0000 (20:07 +0000)
182 files changed:
lustre/ChangeLog
lustre/autoconf/lustre-core.m4
lustre/autoconf/lustre-version.ac
lustre/cmm/cmm_device.c
lustre/contrib/packet-lustre.c
lustre/doc/lfs.1
lustre/doc/lustre_rsync.8 [moved from lustre/doc/lreplicate.8 with 85% similarity]
lustre/include/Makefile.am
lustre/include/cl_object.h
lustre/include/class_hash.h [deleted file]
lustre/include/lclient.h
lustre/include/liblustre.h
lustre/include/linux/lustre_compat25.h
lustre/include/linux/lustre_fsfilt.h
lustre/include/lustre/liblustreapi.h
lustre/include/lustre/ll_fiemap.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre_capa.h
lustre/include/lustre_debug.h
lustre/include/lustre_disk.h
lustre/include/lustre_dlm.h
lustre/include/lustre_export.h
lustre/include/lustre_mds.h
lustre/include/lustre_net.h
lustre/include/lustre_quota.h
lustre/include/lustre_req_layout.h
lustre/include/md_object.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/include/obd_support.h
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-i686.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-ia64.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-oel5-x86_64.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ppc64-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ppc64.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config
lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch
lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
lustre/kernel_patches/patches/jbd2-jcberr-2.6-rhel5.patch
lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
lustre/kernel_patches/targets/2.6-oel5.target.in
lustre/kernel_patches/targets/2.6-rhel5.target.in
lustre/kernel_patches/targets/2.6-sles10.target.in
lustre/kernel_patches/which_patch
lustre/lclient/glimpse.c
lustre/lclient/lcommon_cl.c
lustre/lclient/lcommon_misc.c
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/liblustre/file.c
lustre/liblustre/llite_lib.h
lustre/liblustre/super.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/llite/rw.c
lustre/llite/statahead.c
lustre/llite/vvp_io.c
lustre/llite/xattr.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_ea.c
lustre/lov/lov_internal.h
lustre/lov/lov_io.c
lustre/lov/lov_lock.c
lustre/lov/lov_obd.c
lustre/lov/lov_offset.c
lustre/lov/lov_pack.c
lustre/lov/lov_page.c
lustre/lov/lov_pool.c
lustre/lov/lovsub_lock.c
lustre/lvfs/fsfilt_ext3.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_lib.c
lustre/mdc/mdc_locks.c
lustre/mdd/mdd_device.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_lov.c
lustre/mdd/mdd_object.c
lustre/mdd/mdd_quota.c
lustre/mds/mds_fs.c
lustre/mds/mds_log.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_open.c
lustre/mdt/mdt_recovery.c
lustre/mdt/mdt_reint.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_handler.c
lustre/obdclass/Makefile.in
lustre/obdclass/autoMakefile.am
lustre/obdclass/cl_io.c
lustre/obdclass/cl_lock.c
lustre/obdclass/cl_object.c
lustre/obdclass/cl_page.c
lustre/obdclass/class_hash.c [deleted file]
lustre/obdclass/debug.c
lustre/obdclass/genops.c
lustre/obdclass/llog_swab.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lustre_handles.c
lustre/obdclass/obd_config.c
lustre/obdclass/obd_mount.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/obdfilter/filter.c
lustre/obdfilter/filter_io.c
lustre/obdfilter/filter_io_26.c
lustre/obdfilter/filter_lvb.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_io.c
lustre/ofd/ofd_lvb.c
lustre/ofd/ofd_obd.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_create.c
lustre/osc/osc_io.c
lustre/osc/osc_lock.c
lustre/osc/osc_page.c
lustre/osc/osc_request.c
lustre/osd/osd_handler.c
lustre/ost/ost_handler.c
lustre/ptlrpc/client.c
lustre/ptlrpc/connection.c
lustre/ptlrpc/import.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpc_module.c
lustre/ptlrpc/service.c
lustre/ptlrpc/wiretest.c
lustre/quota/quota_adjust_qunit.c
lustre/quota/quota_context.c
lustre/quota/quota_interface.c
lustre/quota/quota_master.c
lustre/scripts/version_tag.pl
lustre/tests/Makefile.am
lustre/tests/acceptance-small.sh
lustre/tests/cfg/local.sh
lustre/tests/conf-sanity.sh
lustre/tests/flocks_test.c
lustre/tests/insanity.sh
lustre/tests/lustre_rsync-test.sh [moved from lustre/tests/lreplicate-test.sh with 85% similarity]
lustre/tests/mpi/lp_utils.c
lustre/tests/mpi/parallel_grouplock.c
lustre/tests/multiop.c
lustre/tests/ost-pools.sh
lustre/tests/parallel-scale.sh
lustre/tests/recovery-mds-scale.sh
lustre/tests/recovery-random-scale.sh
lustre/tests/recovery-small.sh
lustre/tests/replay-dual.sh
lustre/tests/replay-single.sh
lustre/tests/replay-vbr.sh
lustre/tests/sanity-nano.sh
lustre/tests/sanity-quota.sh
lustre/tests/sanity.sh
lustre/tests/sanityN.sh
lustre/tests/test-framework.sh
lustre/utils/Makefile.am
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/lustre_rsync.c [moved from lustre/utils/lreplicate.c with 98% similarity]
lustre/utils/lustre_rsync.h [moved from lustre/utils/lreplicate.h with 91% similarity]
lustre/utils/obd.c
lustre/utils/req-layout.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 753c0c1..82fd400 100644 (file)
@@ -2,8 +2,8 @@ tbd  Sun Microsystems, Inc.
        * version 2.0.0
        * Support for kernels:
         2.6.16.60-0.39.3 (SLES 10),
-        2.6.18-128.7.1.el5 (RHEL 5),
-        2.6.18-128.7.1.el5 (OEL 5),
+        2.6.18-164.6.1.el5 (RHEL 5),
+        2.6.18-164.6.1.0.1.el5 (OEL 5),
         2.6.27.19-5 (SLES11)
         2.6.27 vanilla (kernel.org).
        * Client support for unpatched kernels:
@@ -13,7 +13,32 @@ tbd  Sun Microsystems, Inc.
        * 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).
-       * File join has been disabled in this release, refer to Bugzilla 16929.
+
+Severity   : normal
+Bugzilla   : 21513
+Description: Clear imp_force_reconnect correctly in ptlrpc_connect_interpret()
+
+Severity   : enhancement
+Bugzilla   : 20773
+Description: Update kernel to RHEL5.4 2.6.18-164.6.1.el5 and
+            OEL5 2.6.18-164.6.1.0.1.el5(Both in-kernel OFED enabled).
+
+Severity   : normal
+Bugzilla   : 21049
+Description: Sanity test_27p fails.
+Details    : OBD_FAIL_OST_ENOSPC has been moved to filter_statfs().
+             Sanity tests 27 were cleaned up and improved.
+
+Severity   : normal$
+Bugzilla   : 18631
+Description: Unify req format on client/servers
+Details    : Use new req_capsule API [almost] everywhere instead of old PTLRPC
+             buffers and swabbers approach..
+
+Severity   : normal
+Frequency  : cleanup
+Bugzilla   : 19200
+Description: drop join file stuff.
 
 Severity   : enhancement
 Bugzilla   : 14250
@@ -2297,6 +2322,13 @@ Bugzilla   : 20463
 Descriptoin: getstripe doesn't report stripe count = -1 sanely
 Details    : Detect and print out the 'stripe count = -1' case properly.
 
+Severity   : normal
+Bugzilla   : 19128
+Description: Out or order replies might be lost on replay
+Details    : In ptlrpc_retain_replayable_request if we cannot find retained
+             request with tid smaller then one currently being added, add it
+            to the start, not end of the list.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index 664c48f..a36b56d 100644 (file)
@@ -8,6 +8,7 @@
 AC_DEFUN([LC_CONFIG_SRCDIR],
 [AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
 libcfs_is_module=yes
+ldiskfs_is_ext4=no
 ])
 
 #
@@ -1780,6 +1781,7 @@ AC_DEFUN([LC_LINUX_FIEMAP_H],
 [LB_CHECK_FILE([$LINUX/include/linux/fiemap.h],[
         AC_MSG_CHECKING([if fiemap.h can be compiled])
         LB_LINUX_TRY_COMPILE([
+                #include <linux/types.h>
                 #include <linux/fiemap.h>
         ],[],[
                 AC_MSG_RESULT([yes])
@@ -1791,23 +1793,6 @@ AC_DEFUN([LC_LINUX_FIEMAP_H],
 [])
 ])
 
-# 2.6.17 super_block use s_vfs_rename_mutex instead of s_vfs_rename_sem
-AC_DEFUN([LC_VFS_RENAME_MUTEX],
-[AC_MSG_CHECKING([super_block has s_vfs_rename_mutex])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct super_block sb;
-        mutex_lock(&sb.s_vfs_rename_mutex);
-],[
-        AC_DEFINE(HAVE_VFS_RENAME_MUTEX, 1,
-                [super_block has s_vfs_rename_mutex])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
 #
 # LC_PROG_LINUX
 #
@@ -1883,7 +1868,6 @@ AC_DEFUN([LC_PROG_LINUX],
          # 2.6.17
          LC_INODE_IPRIVATE
          LC_DQUOTOFF_MUTEX
-         LC_VFS_RENAME_MUTEX
 
          # 2.6.18
          LC_NR_PAGECACHE
@@ -1900,6 +1884,7 @@ AC_DEFUN([LC_PROG_LINUX],
          #2.6.18 + RHEL5 (fc6)
          LC_PG_FS_MISC
          LC_PAGE_CHECKED
+         LC_LINUX_FIEMAP_H
 
          # 2.6.19
          LC_INODE_BLKSIZE
index d2ddb6a..6d696f5 100644 (file)
@@ -1,7 +1,7 @@
 m4_define([LUSTRE_MAJOR],[1])
-m4_define([LUSTRE_MINOR],[9])
-m4_define([LUSTRE_PATCH],[290])
-m4_define([LUSTRE_FIX],[0])
+m4_define([LUSTRE_MINOR],[10])
+m4_define([LUSTRE_PATCH],[0])
+m4_define([LUSTRE_FIX],[31])
 
 dnl # don't forget to update the service tags info
 m4_define([CLIENT_URN],["LUSTRE-200-CLT"])
index deda49e..8867fd8 100644 (file)
@@ -190,7 +190,7 @@ static int cmm_quota_recovery(const struct lu_env *env, struct md_device *m)
 }
 
 static int cmm_quota_check(const struct lu_env *env, struct md_device *m,
-                           struct obd_export *exp, __u32 type)
+                           __u32 type)
 {
         struct cmm_device *cmm_dev = md2cmm_dev(m);
         int rc;
@@ -202,7 +202,7 @@ static int cmm_quota_check(const struct lu_env *env, struct md_device *m,
 
         rc = cmm_child_ops(cmm_dev)->mdo_quota.mqo_check(env,
                                                          cmm_dev->cmm_child,
-                                                         exp, type);
+                                                         type);
         RETURN(rc);
 }
 
index fd58ecc..32ed8e6 100644 (file)
@@ -74,7 +74,7 @@
 
 #define LOV_MAGIC_V1      0x0BD10BD0
 #define LOV_MAGIC         LOV_MAGIC_V1
-#define LOV_MAGIC_JOIN    0x0BD20BD0
+#define LOV_MAGIC_JOIN_V1 0x0BD20BD0
 
 typedef enum {
   OST_REPLY      =  0,       /* reply ? */
@@ -270,7 +270,7 @@ typedef enum {
   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_JOIN_REC    = LLOG_OP_MAGIC | 0x50000, /* obsolete */
   LLOG_HDR_MAGIC   = LLOG_OP_MAGIC | 0x45539,
   LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
 } llog_op_type;
@@ -311,7 +311,6 @@ static gint ett_lustre_obd_dqblk = -1;
 static gint ett_lustre_quota_adjust_qunit = -1;
 static gint ett_lustre_mds_rec_setattr = -1;
 static gint ett_lustre_mds_rec_create = -1;
-static gint ett_lustre_mds_rec_join = -1;
 static gint ett_lustre_mds_rec_link = -1;
 static gint ett_lustre_mds_rec_unlink = -1;
 static gint ett_lustre_mds_rec_rename = -1;
@@ -331,14 +330,11 @@ static gint ett_lustre_mgs_send_param = -1;
 static gint ett_lustre_mgs_target_info = -1;
 static gint ett_lustre_cfg_marker = -1;
 static gint ett_lustre_llog_catid = -1;
-static gint ett_lustre_lov_mds_md_join = -1;
 static gint ett_lustre_llog_rec_hdr = -1;
 static gint ett_lustre_llog_logid_rec = -1;
 static gint ett_lustre_llog_logid = -1;
 static gint ett_lustre_llog_rec_tail = -1;
 static gint ett_lustre_lov_mds_md = -1;
-static gint ett_lustre_llog_array_rec = -1;
-static gint ett_lustre_mds_extent_desc = -1;
 static gint ett_lustre_llog_create_rec = -1;
 static gint ett_lustre_llog_orphan_rec = -1;
 static gint ett_lustre_llog_unlink_rec = -1;
@@ -350,8 +346,6 @@ static gint ett_lustre_llog_cookie = -1;
 static gint ett_lustre_llogd_body = -1;
 static gint ett_lustre_llogd_conn_body = -1;
 static gint ett_lustre_llog_gen = -1;
-static gint ett_lustre_lov_user_md_join = -1;
-static gint ett_lustre_lov_user_ost_data_join = -1;
 static gint ett_lustre_obdo = -1;
 static gint ett_lustre_ost_body = -1;
 static gint ett_lustre_qunit_data = -1;
@@ -376,7 +370,6 @@ static int hf_lustre_mds_rec_unlink = -1 ;
 static int hf_lustre_obd_uuid = -1 ;
 static int hf_lustre_obd_connect_data = -1 ;
 static int hf_lustre_ldlm_intent = -1;
-static int hf_lustre_lov_user_md_join = -1 ;
 static int hf_lustre_obd_ioobj = -1 ;
 static int hf_lustre_niobuf_remote = -1 ;
 static int hf_lustre_ost_key = -1 ;
@@ -396,7 +389,6 @@ static int hf_lustre_llog_cookie= -1;
 static int hf_lustre_mds_md_data= -1; 
 static int hf_lustre_mds_reint_opcode= -1; 
 static int hf_lustre_mds_xattr_eadata = -1;
-static int hf_lustre_lov_mds_md_join = -1 ;
 
 static int hf_lustre_reint_name= -1; 
 static int hf_lustre_reint_old_name= -1; 
@@ -575,7 +567,6 @@ static int hf_lustre_ldlm_reply_lock_policy_res1 = -1;
 static int hf_lustre_mds_rec_link_lk_fsuid = -1;
 static int hf_lustre_llogd_body_lgd_len = -1;
 static int hf_lustre_qunit_data_old_qd_id = -1;
-static int hf_lustre_lov_user_md_join_lmm_stripe_count = -1;
 static int hf_lustre_llog_logid_rec_padding1 = -1;
 static int hf_lustre_quota_adjust_qunit_padding1 = -1;
 static int hf_lustre_llog_size_change_rec_lsc_fid = -1;
@@ -601,7 +592,6 @@ static int hf_lustre_llog_logid_lgl_oid = -1;
 static int hf_lustre_ldlm_inodebits_bits = -1;
 static int hf_lustre_llog_log_hdr_llh_count = -1;
 static int hf_lustre_mds_rec_unlink_ul_padding_4 = -1;
-static int hf_lustre_lov_user_md_join_lmm_stripe_size = -1;
 static int hf_lustre_llog_gen_rec_lgr_tail = -1;
 static int hf_lustre_llog_catid_lci_padding3 = -1;
 static int hf_lustre_qunit_data_qd_qunit = -1;
@@ -610,7 +600,6 @@ static int hf_lustre_llog_setattr_rec_padding = -1;
 static int hf_lustre_mds_rec_rename_rn_opcode = -1;
 static int hf_lustre_mds_rec_create_cr_flags = -1;
 static int hf_lustre_mds_rec_rename_rn_fid1 = -1;
-static int hf_lustre_mds_extent_desc_med_start = -1;
 static int hf_lustre_llog_cookie_lgc_lgl = -1;
 static int hf_lustre_obd_quotactl_qc_dqinfo = -1;
 static int hf_lustre_llog_log_hdr_llh_bitmap = -1;
@@ -623,7 +612,6 @@ static int hf_lustre_mds_rec_unlink_ul_mode = -1;
 static int hf_lustre_llog_orphan_rec_lor_tail = -1;
 static int hf_lustre_llog_logid_rec_padding5 = -1;
 static int hf_lustre_mds_rec_create_cr_fsgid = -1;
-static int hf_lustre_mds_rec_join_jr_fid = -1;
 static int hf_lustre_ldlm_intent_opc = -1;
 static int hf_lustre_llog_rec_hdr_lrh_type = -1;
 static int hf_lustre_mds_rec_link_lk_fsgid = -1;
@@ -643,8 +631,6 @@ static int hf_lustre_ldlm_extent_start = -1;
 static int hf_lustre_mds_rec_unlink_ul_opcode = -1;
 static int hf_lustre_llog_size_change_rec_lsc_hdr = -1;
 static int hf_lustre_mds_rec_unlink_ul_time = -1;
-static int hf_lustre_lov_user_ost_data_join_l_extent_start = -1;
-static int hf_lustre_lov_user_md_join_lmm_tree_id = -1;
 static int hf_lustre_llog_create_rec_lcr_tail = -1;
 static int hf_lustre_mds_rec_setattr_sa_mode = -1;
 static int hf_lustre_llog_logid_lgl_ogr = -1;
@@ -657,7 +643,6 @@ static int hf_lustre_mds_rec_setattr_sa_gid = -1;
 static int hf_lustre_lov_desc_ld_pattern = -1;
 static int hf_lustre_qunit_data_qd_id = -1;
 static int hf_lustre_mgs_target_info_mti_fsname = -1;
-static int hf_lustre_lov_user_md_join_lmm_object_gr = -1;
 static int hf_lustre_ldlm_request_lock_flags = -1;
 static int hf_lustre_obdo_o_mode = -1;
 static int hf_lustre_mgs_target_info_mti_svname = -1;
@@ -673,12 +658,9 @@ static int hf_lustre_mds_rec_create_cr_replayfid = -1;
 static int hf_lustre_ldlm_lock_desc_l_policy_data = -1;
 static int hf_lustre_mds_rec_link_lk_suppgid1 = -1;
 static int hf_lustre_obd_quotactl_qc_cmd = -1;
-static int hf_lustre_lov_user_md_join_lmm_object_id = -1;
 static int hf_lustre_mds_rec_rename_rn_padding_3 = -1;
 static int hf_lustre_qunit_data_padding = -1;
-static int hf_lustre_lov_user_md_join_lmm_objects = -1;
 static int hf_lustre_quota_adjust_qunit_qaq_flags = -1;
-static int hf_lustre_lov_user_ost_data_join_l_object_gr = -1;
 static int hf_lustre_ldlm_lock_desc_l_granted_mode = -1;
 static int hf_lustre_obdo_o_gr = -1;
 static int hf_lustre_mds_rec_unlink_ul_padding_2 = -1;
@@ -686,7 +668,6 @@ static int hf_lustre_obdo_o_gid = -1;
 static int hf_lustre_llog_catid_lci_logid = -1;
 static int hf_lustre_llog_rec_tail_lrt_index = -1;
 static int hf_lustre_obdo_o_mds = -1;
-static int hf_lustre_mds_extent_desc_med_lmm = -1;
 static int hf_lustre_lov_desc_ld_default_stripe_count = -1;
 static int hf_lustre_ldlm_resource_desc_lr_padding = -1;
 static int hf_lustre_cfg_marker_cm_vers = -1;
@@ -696,13 +677,10 @@ static int hf_lustre_llogd_body_lgd_index = -1;
 static int hf_lustre_cfg_marker_cm_tgtname = -1;
 static int hf_lustre_mds_rec_unlink_ul_padding_1 = -1;
 static int hf_lustre_mds_rec_unlink_ul_cap = -1;
-static int hf_lustre_llog_array_rec_lmr_med = -1;
 static int hf_lustre_llog_setattr_rec_lsr_ogen = -1;
 static int hf_lustre_mds_rec_create_cr_padding_3 = -1;
 static int hf_lustre_llog_logid_rec_lid_hdr = -1;
-static int hf_lustre_lov_user_ost_data_join_l_ost_idx = -1;
 static int hf_lustre_obdo_o_easize = -1;
-static int hf_lustre_lov_user_md_join_lmm_array_id = -1;
 static int hf_lustre_ost_body_oa = -1;
 static int hf_lustre_llog_logid_rec_padding3 = -1;
 static int hf_lustre_llog_log_hdr_llh_flags = -1;
@@ -712,14 +690,12 @@ static int hf_lustre_llog_size_change_rec_padding = -1;
 static int hf_lustre_mgs_target_info_mti_config_ver = -1;
 static int hf_lustre_cfg_marker_cm_createtime = -1;
 static int hf_lustre_qunit_data_old_qd_count = -1;
-static int hf_lustre_lov_mds_md_join_lmmj_array_id = -1;
 static int hf_lustre_mds_rec_setattr_sa_uid = -1;
 static int hf_lustre_llog_catid_lci_padding1 = -1;
 static int hf_lustre_mds_rec_setattr_sa_atime = -1;
 static int hf_lustre_lov_desc_ld_active_tgt_count = -1;
 static int hf_lustre_obdo_o_lcookie = -1;
 static int hf_lustre_llog_gen_rec_lgr_gen = -1;
-static int hf_lustre_lov_user_ost_data_join_l_object_id = -1;
 static int hf_lustre_obdo_o_id = -1;
 static int hf_lustre_mgs_target_info_mti_uuid = -1;
 static int hf_lustre_mds_rec_link_lk_padding_1 = -1;
@@ -739,15 +715,12 @@ static int hf_lustre_llog_orphan_rec_lor_hdr = -1;
 static int hf_lustre_mds_rec_rename_rn_fsuid = -1;
 static int hf_lustre_cfg_marker_cm_flags = -1;
 static int hf_lustre_obdo_o_padding_3 = -1;
-static int hf_lustre_lov_user_ost_data_join_l_ost_gen = -1;
 static int hf_lustre_mds_rec_create_cr_fsuid = -1;
 static int hf_lustre_mds_rec_unlink_ul_fsgid = -1;
 static int hf_lustre_ldlm_request_lock_desc = -1;
-static int hf_lustre_lov_user_md_join_lmm_pattern = -1;
 static int hf_lustre_mds_rec_unlink_ul_fsuid = -1;
 static int hf_lustre_mds_rec_link_lk_suppgid2 = -1;
 static int hf_lustre_llog_orphan_rec_padding = -1;
-static int hf_lustre_lov_user_md_join_lmm_tree_gen = -1;
 static int hf_lustre_obdo_o_flags = -1;
 static int hf_lustre_mgs_target_info_mti_params = -1;
 static int hf_lustre_llog_logid_lgl_ogen = -1;
@@ -757,7 +730,6 @@ static int hf_lustre_llog_unlink_rec_lur_oid = -1;
 static int hf_lustre_qunit_data_qd_count = -1;
 static int hf_lustre_mds_rec_rename_rn_padding_1 = -1;
 static int hf_lustre_obdo_o_mtime = -1;
-static int hf_lustre_lov_mds_md_join_lmmj_md = -1;
 static int hf_lustre_mds_rec_rename_rn_fsgid = -1;
 static int hf_lustre_mds_rec_rename_rn_cap = -1;
 static int hf_lustre_obdo_o_blksize = -1;
@@ -767,7 +739,6 @@ static int hf_lustre_mds_rec_link_lk_time = -1;
 static int hf_lustre_ldlm_reply_lock_handle = -1;
 static int hf_lustre_mds_rec_unlink_ul_padding_3 = -1;
 static int hf_lustre_llogd_body_lgd_saved_index = -1;
-static int hf_lustre_mds_rec_join_jr_headsize = -1;
 static int hf_lustre_mds_rec_rename_rn_padding_4 = -1;
 static int hf_lustre_qunit_data_old_qd_isblk = -1;
 static int hf_lustre_obdo_o_blocks = -1;
@@ -782,10 +753,7 @@ static int hf_lustre_ldlm_lock_desc_l_req_mode = -1;
 static int hf_lustre_ldlm_extent_end = -1;
 static int hf_lustre_llog_gen_rec_lgr_hdr = -1;
 static int hf_lustre_llog_orphan_rec_lor_ogen = -1;
-static int hf_lustre_lov_user_md_join_lmm_extent_count = -1;
-static int hf_lustre_mds_extent_desc_med_len = -1;
 static int hf_lustre_llogd_body_lgd_llh_flags = -1;
-static int hf_lustre_llog_array_rec_lmr_hdr = -1;
 static int hf_lustre_llog_log_hdr_llh_cat_idx = -1;
 static int hf_lustre_llog_log_hdr_llh_bitmap_offset=-1;
 static int hf_lustre_llog_orphan_rec_lor_oid = -1;
@@ -795,11 +763,9 @@ static int hf_lustre_mds_rec_create_cr_padding_4 = -1;
 static int hf_lustre_llog_logid_rec_padding4 = -1;
 static int hf_lustre_mds_rec_link_lk_padding_2 = -1;
 static int hf_lustre_llog_setattr_rec_lsr_gid = -1;
-static int hf_lustre_lov_user_md_join_lmm_magic = -1;
 static int hf_lustre_obd_quotactl_qc_type = -1;
 static int hf_lustre_cfg_marker_padding = -1;
 static int hf_lustre_mgs_target_info_mti_nids = -1;
-static int hf_lustre_lov_user_ost_data_join_l_extent_end = -1;
 static int hf_lustre_obdo_o_stripe_idx = -1;
 static int hf_lustre_llogd_conn_body_lgdc_logid = -1;
 static int hf_lustre_mds_rec_setattr_sa_fsuid = -1;
@@ -811,7 +777,6 @@ static int hf_lustre_qunit_data_old2_qd_count = -1;
 static int hf_lustre_qunit_data_old2_qd_flags = -1;
 static int hf_lustre_ldlm_flock_start = -1;
 static int hf_lustre_quota_adjust_qunit_qaq_bunit_sz = -1;
-static int hf_lustre_llog_array_rec_lmr_tail = -1;
 static int hf_lustre_ldlm_flock_pid = -1;
 static int hf_lustre_lov_desc_ld_default_stripe_size = -1;
 static int hf_lustre_mds_rec_setattr_sa_opcode = -1;
@@ -856,7 +821,6 @@ static int hf_lustre_llog_cookie_lgc_subsys = -1;
 static int hf_lustre_llog_log_hdr_llh_hdr = -1;
 static int hf_lustre_mds_rec_setattr_sa_fsgid = -1;
 static int hf_lustre_mds_rec_setattr_sa_padding = -1;
-static int hf_lustre_lov_mds_md_join_lmmj_extent_count = -1;
 static int hf_lustre_llog_log_hdr_llh_reserved = -1;
 
 /* Header field declarations for field from lustre_user.h*/
@@ -917,7 +881,6 @@ const value_string lustre_ldlm_opcode[] = {
 
 const value_string lustre_lov_magic[] = {
   { LOV_MAGIC_V1,   "LOV_MAGIC_V1" },
-  { LOV_MAGIC_JOIN, "LOV_MAGIC_JOIN" },
   {0, NULL}
 };
 
@@ -3328,54 +3291,6 @@ lustre_dissect_struct_mds_rec_create(tvbuff_t *tvb _U_, int offset _U_, packet_i
 
 
 /* TODO : find where this structure appear ! */
-/* IDL: struct mds_rec_join { */
-/* IDL:        struct ll_fid { */
-/* IDL: } jr_fid; */
-/* IDL:        uint64 jr_headsize; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_mds_rec_join_jr_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  //offset=lustre_dissect_struct_HASH(0x85b17c0)(tvb,offset,pinfo,tree,hf_lustre_mds_rec_join_jr_fid);
-  return offset;
-}
-
-static int
-lustre_dissect_element_mds_rec_join_jr_headsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mds_rec_join_jr_headsize);
-
-  return offset;
-}
-
-int
-lustre_dissect_struct_mds_rec_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_mds_rec_join);
-  }
-
-  offset=lustre_dissect_element_mds_rec_join_jr_fid(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_mds_rec_join_jr_headsize(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-
 /* IDL: struct mds_rec_link { */
 /* IDL:        uint32 lk_opcode; */
 /* IDL:        uint32 lk_fsuid; */
@@ -5333,67 +5248,6 @@ lustre_dissect_struct_llog_catid(tvbuff_t *tvb _U_, int offset _U_, packet_info
   return offset;
 }
 
-
-/* IDL: struct lov_mds_md_join { */
-/* IDL:        struct lov_mds_md { */
-/* IDL: } lmmj_md; */
-/* IDL:        struct llog_logid { */
-/* IDL: } lmmj_array_id; */
-/* IDL:        uint32 lmmj_extent_count; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_lov_mds_md_join_lmmj_md(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_join_lmmj_md); 
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_mds_md_join_lmmj_array_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_join_lmmj_array_id);
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_mds_md_join_lmmj_extent_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_mds_md_join_lmmj_extent_count);
-
-  return offset;
-}
-
-int
-lustre_dissect_struct_lov_mds_md_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_lov_mds_md_join);
-  }
-
-  offset=lustre_dissect_element_lov_mds_md_join_lmmj_md(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_mds_md_join_lmmj_array_id(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_mds_md_join_lmmj_extent_count(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-
-
 /* IDL: struct llog_rec_hdr { */
 /* IDL:        uint32 lrh_len; */
 /* IDL:        uint32 lrh_index; */
@@ -5623,132 +5477,6 @@ lustre_dissect_struct_llog_logid_rec(tvbuff_t *tvb _U_, int offset _U_, packet_i
   return offset;
 }
 
-
-
-/* IDL: struct mds_extent_desc { */
-/* IDL:        uint64 med_start; */
-/* IDL:        uint64 med_len; */
-/* IDL:        struct lov_mds_md { */
-/* IDL: } med_lmm; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_mds_extent_desc_med_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mds_extent_desc_med_start);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_mds_extent_desc_med_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_mds_extent_desc_med_len);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_mds_extent_desc_med_lmm(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  //offset=lustre_dissect_struct_HASH(0x85d3578)(tvb,offset,pinfo,tree,hf_lustre_mds_extent_desc_med_lmm);
-  /*g_print("bug\n");*/
-  return offset;
-}
-
-int
-lustre_dissect_struct_mds_extent_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_mds_extent_desc);
-  }
-
-  offset=lustre_dissect_element_mds_extent_desc_med_start(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_mds_extent_desc_med_len(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_mds_extent_desc_med_lmm(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-
-/* IDL: struct llog_array_rec { */
-/* IDL:        struct llog_rec_hdr { */
-/* IDL: } lmr_hdr; */
-/* IDL:        struct mds_extent_desc { */
-/* IDL: } lmr_med; */
-/* IDL:        struct llog_rec_tail { */
-/* IDL: } lmr_tail; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_llog_array_rec_lmr_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  //offset=lustre_dissect_struct_HASH(0x85d374c)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_hdr);
-  
-  return offset;
-}
-
-static int
-lustre_dissect_element_llog_array_rec_lmr_med(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  //offset=lustre_dissect_struct_HASH(0x85d4328)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_med);
-  
-  return offset;
-}
-
-static int
-lustre_dissect_element_llog_array_rec_lmr_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  //offset=lustre_dissect_struct_HASH(0x85d4478)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_tail);
-  
-  return offset;
-}
-
-int
-lustre_dissect_struct_llog_array_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_llog_array_rec);
-  }
-
-  offset=lustre_dissect_element_llog_array_rec_lmr_hdr(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_llog_array_rec_lmr_med(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_llog_array_rec_lmr_tail(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-
-
-
 /* IDL: struct llog_create_rec { */
 /* IDL:        struct llog_rec_hdr { */
 /* IDL: } lcr_hdr; */
@@ -6741,259 +6469,6 @@ lustre_dissect_struct_llogd_conn_body(tvbuff_t *tvb _U_, int offset _U_, packet_
   return offset;
 }
 
-
-
-/* TODO : find when this Structure appear on the wire */
-/* IDL: struct lov_user_ost_data_join { */
-/* IDL:        uint64 l_extent_start; */
-/* IDL:        uint64 l_extent_end; */
-/* IDL:        uint64 l_object_id; */
-/* IDL:        uint64 l_object_gr; */
-/* IDL:        uint32 l_ost_gen; */
-/* IDL:        uint32 l_ost_idx; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_extent_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_extent_start);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_extent_end(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_extent_end);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_object_id);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_object_gr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_object_gr);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_ost_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_ost_gen);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_ost_data_join_l_ost_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_ost_data_join_l_ost_idx);
-
-  return offset;
-}
-
-int
-lustre_dissect_struct_lov_user_ost_data_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_lov_user_ost_data_join);
-  }
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_extent_start(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_extent_end(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_object_id(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_object_gr(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_ost_gen(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_ost_data_join_l_ost_idx(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-/* TODO : find when this Structure appear on the wire */
-/* IDL: struct lov_user_md_join { */
-/* IDL:        uint32 lmm_magic; */
-/* IDL:        uint32 lmm_pattern; */
-/* IDL:        uint64 lmm_object_id; */
-/* IDL:        uint64 lmm_object_gr; */
-/* IDL:        uint32 lmm_stripe_size; */
-/* IDL:        uint32 lmm_stripe_count; */
-/* IDL:        uint32 lmm_extent_count; */
-/* IDL:        uint64 lmm_tree_id; */
-/* IDL:        uint64 lmm_tree_gen; */
-/* IDL:        struct llog_logid { */
-/* IDL: } lmm_array_id; */
-/* IDL:        struct lov_user_ost_data_join { */
-/* IDL: } lmm_objects[0]; */
-/* IDL: } */
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_magic);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_pattern(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_pattern);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_object_id);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_object_gr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_object_gr);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_stripe_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_stripe_size);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_stripe_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_stripe_count);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_extent_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint32(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_extent_count);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_tree_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_tree_id);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_tree_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=dissect_uint64(tvb, offset, pinfo, tree,  hf_lustre_lov_user_md_join_lmm_tree_gen);
-
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_array_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-  offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_lov_user_md_join_lmm_array_id);
-  return offset;
-}
-
-static int
-lustre_dissect_element_lov_user_md_join_lmm_objects(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-{
-
-  offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_objects);
-  //for (i = 0; i < 0; i++)
-  //   offset=lustre_dissect_element_lov_user_md_join_lmm_objects_(tvb, offset, pinfo, tree);
-
-  return offset;
-}
-
-//static int
-//lustre_dissect_element_lov_user_md_join_lmm_objects_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_)
-//{
-//    //offset=lustre_dissect_struct_HASH(0x85eb304)(tvb,offset,pinfo,tree,hf_lustre_lov_user_md_join_lmm_objects);
-//    return offset;
-//}
-
-int
-lustre_dissect_struct_lov_user_md_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_)
-{
-  proto_item *item = NULL;
-  proto_tree *tree = NULL;
-  int old_offset;
-
-
-
-  old_offset=offset;
-
-  if (parent_tree) {
-    item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
-    tree = proto_item_add_subtree(item, ett_lustre_lov_user_md_join);
-  }
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_magic(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_pattern(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_object_id(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_object_gr(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_stripe_size(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_stripe_count(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_extent_count(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_tree_id(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_tree_gen(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_array_id(tvb, offset, pinfo, tree);
-
-  offset=lustre_dissect_element_lov_user_md_join_lmm_objects(tvb, offset, pinfo, tree);
-
-
-  proto_item_set_len(item, offset-old_offset);
-
-  return offset;
-}
-
-
 /* IDL: struct obdo { */
 /* IDL:        uint64 o_valid; */
 /* IDL:        uint64 o_id; */
@@ -8035,10 +7510,6 @@ lustre_ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo
                 case LOV_MAGIC_V1:
                   offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1);
                   break;
-                case LOV_MAGIC_JOIN:
-                  offset=lustre_dissect_struct_lov_mds_md_join(tvb, offset, pinfo, tree, 
-                      hf_lustre_lov_mds_md_join);
-                  break;
                 default:
                   offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, 
                       hf_lustre_extra_padding, LUSTRE_DLM_INTENT_REC_OFF);
@@ -9248,8 +8719,6 @@ void proto_register_dcerpc_lustre(void)
     { &hf_lustre_ldlm_intent,
       { "ldlm intent", "lustre.ldlm_intent", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
 
-    { &hf_lustre_lov_user_md_join,
-      { "lov user md join", "lustre.lov_user_md_join", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
     { &hf_lustre_obd_ioobj,
       { "lustre obd ioobj", "lustre.obd_ioobj", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}},
     { &hf_lustre_niobuf_remote,
@@ -9297,8 +8766,6 @@ void proto_register_dcerpc_lustre(void)
       { "Lgd Len", "lustre.llogd_body.lgd_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_qunit_data_old_qd_id, 
       { "Qd Id", "lustre.qunit_data_old.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_stripe_count, 
-      { "Lmm Stripe Count", "lustre.lov_user_md_join.lmm_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_logid_rec_padding1, 
       { "Padding1", "lustre.llog_logid_rec.padding1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_quota_adjust_qunit_padding1, 
@@ -9337,8 +8804,6 @@ void proto_register_dcerpc_lustre(void)
       { "mds reint opcode", "lustre.mds_reint_opcode", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_xattr_eadata, 
       { "mds xattr eadata", "lustre.mds_xattr_eadata", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_mds_md_join, 
-      { "lov mds md join", "lustre.lov_mds_md_join", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
     { &hf_lustre_reint_name, 
       { "mds reint name", "lustre.mds_reint_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
     { &hf_lustre_reint_old_name, 
@@ -9406,8 +8871,6 @@ void proto_register_dcerpc_lustre(void)
       { "Llh Count", "lustre.llog_log_hdr.llh_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_unlink_ul_padding_4, 
       { "Ul Padding 4", "lustre.mds_rec_unlink.ul_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_stripe_size, 
-      { "Lmm Stripe Size", "lustre.lov_user_md_join.lmm_stripe_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_gen_rec_lgr_tail, 
       { "Lgr Tail", "lustre.llog_gen_rec.lgr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_catid_lci_padding3, 
@@ -9424,8 +8887,6 @@ void proto_register_dcerpc_lustre(void)
       { "Cr Flags", "lustre.mds_rec_create.cr_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_rename_rn_fid1, 
       { "Rn Fid1", "lustre.mds_rec_rename.rn_fid1", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
-    { &hf_lustre_mds_extent_desc_med_start, 
-      { "Med Start", "lustre.mds_extent_desc.med_start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_cookie_lgc_lgl, 
       { "Lgc Lgl", "lustre.llog_cookie.lgc_lgl", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_obd_quotactl_qc_dqinfo, 
@@ -9450,8 +8911,6 @@ void proto_register_dcerpc_lustre(void)
       { "Padding5", "lustre.llog_logid_rec.padding5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_create_cr_fsgid, 
       { "Cr Fsgid", "lustre.mds_rec_create.cr_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_mds_rec_join_jr_fid, 
-      { "Jr Fid", "lustre.mds_rec_join.jr_fid", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     /*-------------------------------------------------------------------------------------------------------------*/
     /*all this flags are uint64, but I don't find the way to use something like TFS() with a Uint64*/
     { &hf_lustre_ldlm_intent_opc_open, 
@@ -9511,10 +8970,6 @@ void proto_register_dcerpc_lustre(void)
       { "Lsc Hdr", "lustre.llog_size_change_rec.lsc_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_unlink_ul_time, 
       { "Ul Time", "lustre.mds_rec_unlink.ul_time",FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_extent_start, 
-      { "L Extent Start", "lustre.lov_user_ost_data_join.l_extent_start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_tree_id, 
-      { "Lmm Tree Id", "lustre.lov_user_md_join.lmm_tree_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_create_rec_lcr_tail, 
       { "Lcr Tail", "lustre.llog_create_rec.lcr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_setattr_sa_mode, 
@@ -9539,8 +8994,6 @@ void proto_register_dcerpc_lustre(void)
       { "Qd Id", "lustre.qunit_data.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mgs_target_info_mti_fsname, 
       { "Mti Fsname", "lustre.mgs_target_info.mti_fsname", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_object_gr, 
-      { "Lmm Object Gr", "lustre.lov_user_md_join.lmm_object_gr", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_ldlm_request_lock_flags, 
       { "Lock Flags", "lustre.ldlm_request.lock_flags", FT_UINT32, BASE_HEX, NULL, 0 , "", HFILL }},
     { &hf_lustre_obdo_o_mode, 
@@ -9571,18 +9024,12 @@ void proto_register_dcerpc_lustre(void)
       { "Lk Suppgid1", "lustre.mds_rec_link.lk_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obd_quotactl_qc_cmd, 
       { "Qc Cmd", "lustre.obd_quotactl.qc_cmd", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_object_id, 
-      { "Lmm Object Id", "lustre.lov_user_md_join.lmm_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_rename_rn_padding_3, 
       { "Rn Padding 3", "lustre.mds_rec_rename.rn_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_qunit_data_padding, 
       { "Padding", "lustre.qunit_data.padding", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_objects, 
-      { "Lmm Objects", "lustre.lov_user_md_join.lmm_objects", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_quota_adjust_qunit_qaq_flags, 
       { "Qaq Flags", "lustre.quota_adjust_qunit.qaq_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_object_gr, 
-      { "L Object Gr", "lustre.lov_user_ost_data_join.l_object_gr", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_ldlm_lock_desc_l_granted_mode, 
       { "L Granted Mode", "lustre.ldlm_lock_desc.l_granted_mode", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_mode_t_vals), 0, "", HFILL }},
     { &hf_lustre_obdo_o_gr, 
@@ -9597,8 +9044,6 @@ void proto_register_dcerpc_lustre(void)
       { "Lrt Index", "lustre.llog_rec_tail.lrt_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_mds, 
       { "O Mds", "lustre.obdo.o_mds", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_mds_extent_desc_med_lmm, 
-      { "Med Lmm", "lustre.mds_extent_desc.med_lmm", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_lov_desc_ld_default_stripe_count, 
       { "Ld Default Stripe Count", "lustre.lov_desc.ld_default_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_ldlm_resource_desc_lr_padding, 
@@ -9617,20 +9062,14 @@ void proto_register_dcerpc_lustre(void)
       { "Ul Padding 1", "lustre.mds_rec_unlink.ul_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_unlink_ul_cap, 
       { "Ul Cap", "lustre.mds_rec_unlink.ul_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_llog_array_rec_lmr_med, 
-      { "Lmr Med", "lustre.llog_array_rec.lmr_med", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_setattr_rec_lsr_ogen, 
       { "Lsr Ogen", "lustre.llog_setattr_rec.lsr_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_create_cr_padding_3, 
       { "Cr Padding 3", "lustre.mds_rec_create.cr_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_logid_rec_lid_hdr, 
       { "Lid Hdr", "lustre.llog_logid_rec.lid_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_ost_idx, 
-      { "L Ost Idx", "lustre.lov_user_ost_data_join.l_ost_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_easize, 
       { "O Easize", "lustre.obdo.o_easize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_array_id, 
-      { "Lmm Array Id", "lustre.lov_user_md_join.lmm_array_id", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_ost_body_oa, 
       { "Oa", "lustre.ost_body.oa", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_logid_rec_padding3, 
@@ -9656,8 +9095,6 @@ void proto_register_dcerpc_lustre(void)
       { "Cm Createtime", "lustre.cfg_marker.cm_createtime",FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_qunit_data_old_qd_count, 
       { "Qd Count", "lustre.qunit_data_old.qd_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_mds_md_join_lmmj_array_id, 
-      { "Lmmj Array Id", "lustre.lov_mds_md_join.lmmj_array_id", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_setattr_sa_uid, 
       { "Sa Uid", "lustre.mds_rec_setattr.sa_uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_catid_lci_padding1, 
@@ -9670,8 +9107,6 @@ void proto_register_dcerpc_lustre(void)
       { "O Lcookie", "lustre.obdo.o_lcookie", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_gen_rec_lgr_gen, 
       { "Lgr Gen", "lustre.llog_gen_rec.lgr_gen", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_object_id, 
-      { "L Object Id", "lustre.lov_user_ost_data_join.l_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_id, 
       { "O Id", "lustre.obdo.o_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mgs_target_info_mti_uuid, 
@@ -9710,24 +9145,18 @@ void proto_register_dcerpc_lustre(void)
       { "Cm Flags", "lustre.cfg_marker.cm_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_padding_3, 
       { "O Padding 3", "lustre.obdo.o_padding_3", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_ost_gen, 
-      { "L Ost Gen", "lustre.lov_user_ost_data_join.l_ost_gen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_create_cr_fsuid, 
       { "Cr Fsuid", "lustre.mds_rec_create.cr_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_unlink_ul_fsgid, 
       { "Ul Fsgid", "lustre.mds_rec_unlink.ul_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_ldlm_request_lock_desc, 
       { "Lock Desc", "lustre.ldlm_request.lock_desc", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_pattern, 
-      { "Lmm Pattern", "lustre.lov_user_md_join.lmm_pattern", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_unlink_ul_fsuid, 
       { "Ul Fsuid", "lustre.mds_rec_unlink.ul_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_link_lk_suppgid2, 
       { "Lk Suppgid2", "lustre.mds_rec_link.lk_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_orphan_rec_padding, 
       { "Padding", "lustre.llog_orphan_rec.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_tree_gen, 
-      { "Lmm Tree Gen", "lustre.lov_user_md_join.lmm_tree_gen", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_flags, 
       { "O Flags", "lustre.obdo.o_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mgs_target_info_mti_params, 
@@ -9746,8 +9175,6 @@ void proto_register_dcerpc_lustre(void)
       { "Rn Padding 1", "lustre.mds_rec_rename.rn_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_mtime, 
       { "O Mtime", "lustre.obdo.o_mtime",FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_mds_md_join_lmmj_md, 
-      { "Lmmj Md", "lustre.lov_mds_md_join.lmmj_md", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_rename_rn_fsgid, 
       { "Rn Fsgid", "lustre.mds_rec_rename.rn_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_rename_rn_cap, 
@@ -9766,8 +9193,6 @@ void proto_register_dcerpc_lustre(void)
       { "Ul Padding 3", "lustre.mds_rec_unlink.ul_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llogd_body_lgd_saved_index, 
       { "Lgd Saved Index", "lustre.llogd_body.lgd_saved_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_mds_rec_join_jr_headsize, 
-      { "Jr Headsize", "lustre.mds_rec_join.jr_headsize", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_rename_rn_padding_4, 
       { "Rn Padding 4", "lustre.mds_rec_rename.rn_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_qunit_data_old_qd_isblk, 
@@ -9796,14 +9221,8 @@ void proto_register_dcerpc_lustre(void)
       { "Lgr Hdr", "lustre.llog_gen_rec.lgr_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_orphan_rec_lor_ogen, 
       { "Lor Ogen", "lustre.llog_orphan_rec.lor_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_extent_count, 
-      { "Lmm Extent Count", "lustre.lov_user_md_join.lmm_extent_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_mds_extent_desc_med_len, 
-      { "Med Len", "lustre.mds_extent_desc.med_len", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llogd_body_lgd_llh_flags, 
       { "Lgd Llh Flags", "lustre.llogd_body.lgd_llh_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_llog_array_rec_lmr_hdr, 
-      { "Lmr Hdr", "lustre.llog_array_rec.lmr_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_log_hdr_llh_cat_idx, 
       { "Llh Cat Idx", "lustre.llog_log_hdr.llh_cat_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_log_hdr_llh_bitmap_offset, 
@@ -9822,16 +9241,12 @@ void proto_register_dcerpc_lustre(void)
       { "Lk Padding 2", "lustre.mds_rec_link.lk_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_setattr_rec_lsr_gid, 
       { "Lsr Gid", "lustre.llog_setattr_rec.lsr_gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_md_join_lmm_magic, 
-      { "Lmm Magic", "lustre.lov_user_md_join.lmm_magic", FT_UINT32, BASE_HEX, VALS(lustre_lov_magic), 0, "", HFILL }},
     { &hf_lustre_obd_quotactl_qc_type, 
       { "Qc Type", "lustre.obd_quotactl.qc_type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_cfg_marker_padding, 
       { "Padding", "lustre.cfg_marker.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mgs_target_info_mti_nids, 
       { "Mti Nids", "lustre.mgs_target_info.mti_nids", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_user_ost_data_join_l_extent_end, 
-      { "L Extent End", "lustre.lov_user_ost_data_join.l_extent_end", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_obdo_o_stripe_idx, 
       { "O Stripe Idx", "lustre.obdo.o_stripe_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llogd_conn_body_lgdc_logid, 
@@ -9856,8 +9271,6 @@ void proto_register_dcerpc_lustre(void)
       { "Start", "lustre.ldlm_flock.start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_quota_adjust_qunit_qaq_bunit_sz, 
       { "Qaq Bunit Sz", "lustre.quota_adjust_qunit.qaq_bunit_sz", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_llog_array_rec_lmr_tail, 
-      { "Lmr Tail", "lustre.llog_array_rec.lmr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
     { &hf_lustre_ldlm_flock_pid, 
       { "Pid", "lustre.ldlm_flock.pid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_lov_desc_ld_default_stripe_size, 
@@ -9955,8 +9368,6 @@ void proto_register_dcerpc_lustre(void)
       { "Sa Fsgid", "lustre.mds_rec_setattr.sa_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_mds_rec_setattr_sa_padding, 
       { "Sa Padding", "lustre.mds_rec_setattr.sa_padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
-    { &hf_lustre_lov_mds_md_join_lmmj_extent_count, 
-      { "Lmmj Extent Count", "lustre.lov_mds_md_join.lmmj_extent_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
     { &hf_lustre_llog_log_hdr_llh_reserved, 
       { "Llh Reserved", "lustre.llog_log_hdr.llh_reserved", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
 
@@ -10024,7 +9435,6 @@ void proto_register_dcerpc_lustre(void)
     &ett_lustre_quota_adjust_qunit,
     &ett_lustre_mds_rec_setattr,
     &ett_lustre_mds_rec_create,
-    &ett_lustre_mds_rec_join,
     &ett_lustre_mds_rec_link,
     &ett_lustre_mds_rec_unlink,
     &ett_lustre_mds_rec_rename,
@@ -10051,7 +9461,6 @@ void proto_register_dcerpc_lustre(void)
     &ett_lustre_llog_logid,
     &ett_lustre_llog_catid,
     &ett_lustre_llog_logid,
-    &ett_lustre_lov_mds_md_join,
     &ett_lustre_lov_mds_md,
     &ett_lustre_llog_logid,
     &ett_lustre_llog_rec_hdr,
@@ -10060,11 +9469,8 @@ void proto_register_dcerpc_lustre(void)
     &ett_lustre_llog_rec_hdr,
     &ett_lustre_llog_logid,
     &ett_lustre_llog_rec_tail,
-    &ett_lustre_mds_extent_desc,
     &ett_lustre_lov_mds_md,
-    &ett_lustre_llog_array_rec,
     &ett_lustre_llog_rec_hdr,
-    &ett_lustre_mds_extent_desc,
     &ett_lustre_llog_rec_tail,
     &ett_lustre_llog_create_rec,
     &ett_lustre_llog_rec_hdr,
@@ -10099,10 +9505,7 @@ void proto_register_dcerpc_lustre(void)
     &ett_lustre_llogd_conn_body,
     &ett_lustre_llog_gen,
     &ett_lustre_llog_logid,
-    &ett_lustre_lov_user_ost_data_join,
-    &ett_lustre_lov_user_md_join,
     &ett_lustre_llog_logid,
-    &ett_lustre_lov_user_ost_data_join,
     &ett_lustre_obdo,
     &ett_lustre_lustre_handle,
     &ett_lustre_llog_cookie,
index a0a3d9b..d0e96ac 100644 (file)
@@ -24,6 +24,8 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
 .B lfs osts
 .br
 .B lfs getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v] 
+        \fB[--count | -c ] [--size | -s ] [--index | -i ]
+        \fB[--offset | -o ] [--pool | -p ] [--directory | -d ]
         \fB[--recursive|-r] <dirname|filename>\fR
 .br
 .B lfs setstripe [--size|-s stripe-size] [--count|-c stripe-cnt]
@@ -98,8 +100,12 @@ To search the directory tree rooted at the given dir/file name for the files tha
 .B osts 
 List all the OSTs for the filesystem
 .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).
+.B getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v] 
+        \fB[--count | -c ] [--size | -s ] [--index | -i ]
+        \fB[--offset | -o ] [--pool | -p ] [--directory | -d ]
+        \fB[--recursive|-r] <dirname|filename>\fR
+.br
+To list the striping information for a given filename or directory. By default the stripe count, size, and offset will be returned. If you only want specific striping information then the options of \fB--count\fR,\fB--size\fR,\fB--index\fR or \fB--offset\fR plus various combinations of these options can be used to retrieve only what you want. What pools a file belong to can also be obtained with \fB--pool\fR. In the case where you only want details about the files object id information then the \fB--quiet\fR option is used. Additional information available about striping can be displayed with \fB--verbose\fR. The default behavior of lfs getstripe used to retrieve data about a directory is to list all the contents of that directory. If you wish to inquire only about that directory then \fB--directory\fR,can be used to list directory entries instead of its contents in the same manner as ls -d. This can be expanded with \fB--recursive\fR which will recurse into all subdirectories. You can filter the search to return only files that has a object on a specific OST with \fB--obd\fR.
 .TP
 .B setstripe [--size stripe-size] [--count stripe-cnt] 
        \fB[--offset start-ost] [--pool <pool>]\fR
@@ -198,7 +204,7 @@ Lists space usage per OST and MDT in human readable format.
 .B $ lfs df -i 
 Lists inode usage per OST and MDT
 .TP
-.B lfs df --pool <filesystem>[.<pool>] | <pathname>
+.B lfs df --pool <filesystem>[.<pool>] | <pathname>
 List space or inode usage for a specific OST pool
 .TP
 .B $ lfs quota -u bob /mnt/lustre
similarity index 85%
rename from lustre/doc/lreplicate.8
rename to lustre/doc/lustre_rsync.8
index f487241..4d4b4a2 100644 (file)
@@ -1,9 +1,9 @@
-.TH lreplicate 8 "2009 Apr 08" Lustre "Lustre Filesystem replication utility"
+.TH lustre_rsync 8 "2009 Apr 08" Lustre "Lustre Filesystem replication utility"
 .SH NAME
-lreplicate \- Utility to replicate a Lustre Filesystem
+lustre_rsync \- Utility to replicate a Lustre Filesystem
 .SH SYNOPSIS
 .br
-.B lreplicate --source|-s <src> --target|-t <tgt> 
+.B lustre_rsync --source|-s <src> --target|-t <tgt> 
 .br
 .B\t\t\t --mdt|-m <mdt>  [--user|-u <user id>] 
 .br
@@ -13,16 +13,16 @@ lreplicate \- Utility to replicate a Lustre Filesystem
 .br
 
 .br
-.B lreplicate  --statuslog|-l <log>
+.B lustre_rsync  --statuslog|-l <log>
 .br
 
 .br
-.B lreplicate  --statuslog|-l <log> --source|-s <source>
+.B lustre_rsync  --statuslog|-l <log> --source|-s <source>
 .br
 .br
 .B\t\t\t --target|-t <tgt> --mdt|-m <mdt>
 .SH DESCRIPTION
-.B lreplicate
+.B lustre_rsync
 is designed to replicate a Lustre filesystem (source filesystem) to
 another target filesystem (any filesystem type) efficiently by 
 using Lustre MDT changelogs.  A changelog user must be registered
@@ -62,7 +62,7 @@ Mandatory if a valid statuslog created during an previous replication operation
 .B --statuslog=<log>
 .br
 A status log file to which the status of replication is saved. 
-When lreplicate is started, the state from a previous replication
+When lustre_rsync is started, the state from a previous replication
 will be read from here.
 
 If a statuslog from a previous replication operation is specified, the
@@ -104,7 +104,7 @@ cl1
 
 .TP
 Replicate the lustre filesystem /mnt/lustre to /mnt/target.
-$ lreplicate --source=/mnt/lustre --target=/mnt/target \\ 
+$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \\ 
 .br
              --mdt=lustre-MDT0000 --user=cl1 \\
 .br
@@ -126,7 +126,7 @@ Starting changelog record: 0
 .br
 Errors: 0
 .br
-lreplicate took 1 seconds
+lustre_rsync took 1 seconds
 .br
 Changelog records consumed: 22
 .br
@@ -137,7 +137,7 @@ After the filesystem undergoes some changes, replicate the \
 changes. Only the statuslog needs to be specified as it has all the \
 parameters passed earlier.
 .br
-$ lreplicate --statuslog replicate.log --verbose
+$ lustre_rsync --statuslog replicate.log --verbose
 .br
 Replicating Lustre filesystem: lustre
 .br
@@ -155,14 +155,14 @@ Starting changelog record: 22
 .br
 Errors: 0
 .br
-lreplicate took 2 seconds
+lustre_rsync took 2 seconds
 .br
 Changelog records consumed: 42
 .br
 
 .TP
 To replicate the lustre filesystem /mnt/lustre to /mnt/target1 and /mnt/target2.
-$ lreplicate --source=/mnt/lustre \\ 
+$ lustre_rsync --source=/mnt/lustre \\ 
 .br
              --target=/mnt/target1 --target=/mnt/target2 \\ 
 .br
@@ -173,7 +173,7 @@ $ lreplicate --source=/mnt/lustre \\
 
 
 .SH AUTHOR
-The lreplicate command is part of the Lustre filesystem. Contact
+The lustre_rsync command is part of the Lustre filesystem. Contact
 http://www.lustre.org/
 
 .SH SEE ALSO
index 7496e1d..f4c107a 100644 (file)
@@ -41,7 +41,7 @@ EXTRA_DIST = ioctl.h liblustre.h lprocfs_status.h lustre_cfg.h        \
              lustre_fsfilt.h lustre_ha.h lustre_handles.h lustre_import.h \
              lustre_lib.h lustre_sec.h lustre_lite.h lustre_log.h lustre_mds.h \
              lustre_mdc.h lustre_net.h lustre_quota.h lustre_ucache.h lvfs.h \
-             class_hash.h obd_cache.h obd_class.h obd.h obd_lov.h \
+             obd_cache.h obd_class.h obd.h obd_lov.h \
             obd_ost.h obd_support.h lustre_ver.h lu_object.h lu_time.h  \
              md_object.h dt_object.h lustre_param.h lustre_mdt.h \
              lustre_fid.h lustre_fld.h lustre_req_layout.h lustre_capa.h \
index 20b14d2..9996eb3 100644 (file)
@@ -1301,6 +1301,11 @@ struct cl_lock_descr {
         __u64             cld_gid;
         /** Lock mode. */
         enum cl_lock_mode cld_mode;
+        /**
+         * flags to enqueue lock. A combination of bit-flags from
+         * enum cl_enq_flags.
+         */
+        __u32             cld_enq_flags;
 };
 
 #define DDESCR "%s(%d):[%lu, %lu]"
@@ -1414,7 +1419,7 @@ enum cl_lock_state {
          * state, it must wait for the lock.
          * See state diagram for details.
          */
-         CLS_INTRANSIT,
+        CLS_INTRANSIT,
         /**
          * Lock granted, not used.
          */
@@ -1565,6 +1570,10 @@ struct cl_lock {
          */
         struct list_head      cll_inclosure;
         /**
+         * Confict lock at queuing time.
+         */
+        struct cl_lock       *cll_conflict;
+        /**
          * A list of references to this lock, for debugging.
          */
         struct lu_ref         cll_reference;
@@ -1666,8 +1675,9 @@ struct cl_lock_operations {
          * usual return values of lock state-machine methods, this can return
          * -ESTALE to indicate that lock cannot be returned to the cache, and
          * has to be re-initialized.
+         * unuse is a one-shot operation, so it must NOT return CLO_WAIT.
          *
-         * \see ccc_lock_unlock(), lov_lock_unlock(), osc_lock_unlock()
+         * \see ccc_lock_unuse(), lov_lock_unuse(), osc_lock_unuse()
          */
         int  (*clo_unuse)(const struct lu_env *env,
                           const struct cl_lock_slice *slice);
@@ -2156,11 +2166,6 @@ struct cl_io_lock_link {
         struct list_head     cill_linkage;
         struct cl_lock_descr cill_descr;
         struct cl_lock      *cill_lock;
-        /**
-         * flags to enqueue lock for this IO. A combination of bit-flags from
-         * enum cl_enq_flags.
-         */
-        __u32                cill_enq_flags;
         /** optional destructor */
         void               (*cill_fini)(const struct lu_env *env,
                                         struct cl_io_lock_link *link);
@@ -2763,7 +2768,6 @@ struct cl_lock *cl_lock_peek(const struct lu_env *env, const struct cl_io *io,
                              const char *scope, const void *source);
 struct cl_lock *cl_lock_request(const struct lu_env *env, struct cl_io *io,
                                 const struct cl_lock_descr *need,
-                                __u32 enqflags,
                                 const char *scope, const void *source);
 struct cl_lock *cl_lock_at_page(const struct lu_env *env, struct cl_object *obj,
                                 struct cl_page *page, struct cl_lock *except,
@@ -2783,8 +2787,6 @@ void  cl_lock_release   (const struct lu_env *env, struct cl_lock *lock,
                          const char *scope, const void *source);
 void  cl_lock_user_add  (const struct lu_env *env, struct cl_lock *lock);
 int   cl_lock_user_del  (const struct lu_env *env, struct cl_lock *lock);
-int   cl_lock_compatible(const struct cl_lock *lock1,
-                         const struct cl_lock *lock2);
 
 enum cl_lock_state cl_lock_intransit(const struct lu_env *env,
                                      struct cl_lock *lock);
@@ -2901,7 +2903,7 @@ void  cl_io_end          (const struct lu_env *env, struct cl_io *io);
 int   cl_io_lock_add     (const struct lu_env *env, struct cl_io *io,
                           struct cl_io_lock_link *link);
 int   cl_io_lock_alloc_add(const struct lu_env *env, struct cl_io *io,
-                           struct cl_lock_descr *descr, int enqflags);
+                           struct cl_lock_descr *descr);
 int   cl_io_read_page    (const struct lu_env *env, struct cl_io *io,
                           struct cl_page *page);
 int   cl_io_prepare_write(const struct lu_env *env, struct cl_io *io,
diff --git a/lustre/include/class_hash.h b/lustre/include/class_hash.h
deleted file mode 100644 (file)
index 613060d..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * 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 version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
- * Use is subject to license terms.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- */
-
-#ifndef __CLASS_HASH_H
-#define __CLASS_HASH_H
-
-#include <lustre_lib.h>
-
-struct lustre_hash_ops;
-
-typedef struct lustre_hash_bucket {
-        struct hlist_head           lhb_head;       /* entries list */
-        atomic_t                    lhb_count;      /* current entries */
-        rwlock_t                    lhb_rwlock;     /* lustre_hash_bucket */
-} lustre_hash_bucket_t;
-
-#define LUSTRE_MAX_HASH_NAME 16
-
-typedef struct lustre_hash {
-        int                         lh_cur_bits;    /* current hash bits */
-        int                         lh_cur_mask;    /* current hash mask */
-        int                         lh_min_bits;    /* min hash bits */
-        int                         lh_max_bits;    /* max hash bits */
-        int                         lh_min_theta;   /* resize min threshold */
-        int                         lh_max_theta;   /* resize max threshold */
-        int                         lh_flags;       /* hash flags */
-        atomic_t                    lh_count;       /* current entries */
-        atomic_t                    lh_rehash_count;/* resize count */
-        struct lustre_hash_bucket  *lh_buckets;     /* hash buckets */
-        struct lustre_hash_ops     *lh_ops;         /* hash operations */
-        rwlock_t                    lh_rwlock;      /* lustre_hash */
-        char                        lh_name[LUSTRE_MAX_HASH_NAME];
-} lustre_hash_t;
-
-typedef struct lustre_hash_ops {
-        unsigned (*lh_hash)(lustre_hash_t *lh, void *key, unsigned mask);
-        void *   (*lh_key)(struct hlist_node *hnode);
-        int      (*lh_compare)(void *key, struct hlist_node *hnode);
-        void *   (*lh_get)(struct hlist_node *hnode);
-        void *   (*lh_put)(struct hlist_node *hnode);
-        void     (*lh_exit)(struct hlist_node *hnode);
-} lustre_hash_ops_t;
-
-#define LH_DEBUG        0x0001          /* Enable expensive debug checks */
-#define LH_REHASH       0x0002          /* Enable dynamic hash resizing */
-
-#define LHO(lh)         (lh)->lh_ops
-#define LHP(lh, op)     (lh)->lh_ops->lh_ ## op
-
-static inline unsigned
-lh_hash(lustre_hash_t *lh, void *key, unsigned mask)
-{
-        LASSERT(lh);
-        LASSERT(LHO(lh));
-        LASSERT(LHP(lh, hash));
-
-        return LHP(lh, hash)(lh, key, mask);
-}
-
-static inline void *
-lh_key(lustre_hash_t *lh, struct hlist_node *hnode)
-{
-        LASSERT(lh);
-        LASSERT(hnode);
-        LASSERT(LHO(lh));
-
-        if (LHP(lh, key))
-                return LHP(lh, key)(hnode);
-
-        return NULL;
-}
-
-/* Returns 1 on a match,
- * XXX: This would be better if it returned, -1, 0, or 1 for
- *      <, =, > respectivly.  It could then be used to implement
- *      a LH_SORT feature flags which could keep each lustre hash
- *      bucket in order.  This would increase insertion times
- *      but could reduce lookup times for deep chains.  Ideally,
- *      the rehash should keep chain depth short but if that
- *      ends up not being the case this would be a nice feature.
- */
-static inline int
-lh_compare(lustre_hash_t *lh, void *key, struct hlist_node *hnode)
-{
-        LASSERT(lh);
-        LASSERT(hnode);
-        LASSERT(LHO(lh));
-
-        if (LHP(lh, compare))
-                return LHP(lh, compare)(key, hnode);
-
-        return -EOPNOTSUPP;
-}
-
-static inline void *
-lh_get(lustre_hash_t *lh, struct hlist_node *hnode)
-{
-        LASSERT(lh);
-        LASSERT(hnode);
-        LASSERT(LHO(lh));
-
-        if (LHP(lh, get))
-                return LHP(lh, get)(hnode);
-
-        return NULL;
-}
-
-static inline void *
-lh_put(lustre_hash_t *lh, struct hlist_node *hnode)
-{
-        LASSERT(lh);
-        LASSERT(hnode);
-        LASSERT(LHO(lh));
-
-        if (LHP(lh, put))
-                return LHP(lh, put)(hnode);
-
-        return NULL;
-}
-
-static inline void
-lh_exit(lustre_hash_t *lh, struct hlist_node *hnode)
-{
-        LASSERT(lh);
-        LASSERT(hnode);
-        LASSERT(LHO(lh));
-
-        if (LHP(lh, exit))
-                return LHP(lh, exit)(hnode);
-}
-
-/* Validate hnode references the correct key */
-static inline void
-__lustre_hash_key_validate(lustre_hash_t *lh, void *key,
-                           struct hlist_node *hnode)
-{
-        if (unlikely(lh->lh_flags & LH_DEBUG))
-                LASSERT(lh_compare(lh, key, hnode) > 0);
-}
-
-/* Validate hnode is in the correct bucket */
-static inline void
-__lustre_hash_bucket_validate(lustre_hash_t *lh, lustre_hash_bucket_t *lhb,
-                              struct hlist_node *hnode)
-{
-        unsigned i;
-
-        if (unlikely(lh->lh_flags & LH_DEBUG)) {
-                i = lh_hash(lh, lh_key(lh, hnode), lh->lh_cur_mask);
-                LASSERT(&lh->lh_buckets[i] == lhb);
-        }
-}
-
-static inline struct hlist_node *
-__lustre_hash_bucket_lookup(lustre_hash_t *lh,
-                            lustre_hash_bucket_t *lhb, void *key)
-{
-        struct hlist_node *hnode;
-
-        hlist_for_each(hnode, &lhb->lhb_head)
-                if (lh_compare(lh, key, hnode) > 0)
-                        return hnode;
-
-        return NULL;
-}
-
-static inline void *
-__lustre_hash_bucket_add(lustre_hash_t *lh,
-                         lustre_hash_bucket_t *lhb,
-                         struct hlist_node *hnode)
-{
-        hlist_add_head(hnode, &(lhb->lhb_head));
-        atomic_inc(&lhb->lhb_count);
-        atomic_inc(&lh->lh_count);
-
-        return lh_get(lh, hnode);
-}
-
-static inline void *
-__lustre_hash_bucket_del(lustre_hash_t *lh,
-                         lustre_hash_bucket_t *lhb,
-                         struct hlist_node *hnode)
-{
-        hlist_del_init(hnode);
-        LASSERT(atomic_read(&lhb->lhb_count) > 0);
-        atomic_dec(&lhb->lhb_count);
-        LASSERT(atomic_read(&lh->lh_count) > 0);
-        atomic_dec(&lh->lh_count);
-
-        return lh_put(lh, hnode);
-}
-
-/* Some hash init argument constants */
-#define HASH_POOLS_CUR_BITS 3
-#define HASH_POOLS_MAX_BITS 7
-#define HASH_UUID_CUR_BITS 7
-#define HASH_UUID_MAX_BITS 12
-#define HASH_NID_CUR_BITS 7
-#define HASH_NID_MAX_BITS 12
-#define HASH_NID_STATS_CUR_BITS 7
-#define HASH_NID_STATS_MAX_BITS 12
-#define HASH_LQS_CUR_BITS 7
-#define HASH_LQS_MAX_BITS 12
-#define HASH_CONN_CUR_BITS 5
-#define HASH_CONN_MAX_BITS 15
-
-/* Hash init/cleanup functions */
-lustre_hash_t *lustre_hash_init(char *name, unsigned int cur_bits,
-                                unsigned int max_bits,
-                                lustre_hash_ops_t *ops, int flags);
-void lustre_hash_exit(lustre_hash_t *lh);
-
-/* Hash addition functions */
-void lustre_hash_add(lustre_hash_t *lh, void *key,
-                     struct hlist_node *hnode);
-int lustre_hash_add_unique(lustre_hash_t *lh, void *key,
-                           struct hlist_node *hnode);
-void *lustre_hash_findadd_unique(lustre_hash_t *lh, void *key,
-                                 struct hlist_node *hnode);
-
-/* Hash deletion functions */
-void *lustre_hash_del(lustre_hash_t *lh, void *key, struct hlist_node *hnode);
-void *lustre_hash_del_key(lustre_hash_t *lh, void *key);
-
-/* Hash lookup/for_each functions */
-void *lustre_hash_lookup(lustre_hash_t *lh, void *key);
-typedef void (*lh_for_each_cb)(void *obj, void *data);
-void lustre_hash_for_each(lustre_hash_t *lh, lh_for_each_cb, void *data);
-void lustre_hash_for_each_safe(lustre_hash_t *lh, lh_for_each_cb, void *data);
-void lustre_hash_for_each_empty(lustre_hash_t *lh, lh_for_each_cb, void *data);
-void lustre_hash_for_each_key(lustre_hash_t *lh, void *key,
-                              lh_for_each_cb, void *data);
-
-/*
- * Rehash - Theta is calculated to be the average chained
- * hash depth assuming a perfectly uniform hash funcion.
- */
-int lustre_hash_rehash(lustre_hash_t *lh, int bits);
-void lustre_hash_rehash_key(lustre_hash_t *lh, void *old_key,
-                            void *new_key, struct hlist_node *hnode);
-
-
-#define LH_THETA_BITS  10
-
-/* Return integer component of theta */
-static inline int __lustre_hash_theta_int(int theta)
-{
-        return (theta >> LH_THETA_BITS);
-}
-
-/* Return a fractional value between 0 and 999 */
-static inline int __lustre_hash_theta_frac(int theta)
-{
-        return ((theta * 1000) >> LH_THETA_BITS) -
-               (__lustre_hash_theta_int(theta) * 1000);
-}
-
-static inline int __lustre_hash_theta(lustre_hash_t *lh)
-{
-        return (atomic_read(&lh->lh_count) << LH_THETA_BITS) >> lh->lh_cur_bits;
-}
-
-static inline void __lustre_hash_set_theta(lustre_hash_t *lh, int min, int max)
-{
-        LASSERT(min < max);
-        lh->lh_min_theta = min;
-        lh->lh_max_theta = max;
-}
-
-/* Generic debug formatting routines mainly for proc handler */
-int lustre_hash_debug_header(char *str, int size);
-int lustre_hash_debug_str(lustre_hash_t *lh, char *str, int size);
-
-/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */
-#define CFS_GOLDEN_RATIO_PRIME_32 0x9e370001UL
-/*  2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */
-#define CFS_GOLDEN_RATIO_PRIME_64 0x9e37fffffffc0001ULL
-
-/*
- * Generic djb2 hash algorithm for character arrays.
- */
-static inline unsigned
-lh_djb2_hash(void *key, size_t size, unsigned mask)
-{
-        unsigned i, hash = 5381;
-
-        LASSERT(key != NULL);
-
-        for (i = 0; i < size; i++)
-                hash = hash * 33 + ((char *)key)[i];
-
-        return (hash & mask);
-}
-
-/*
- * Generic u32 hash algorithm.
- */
-static inline unsigned
-lh_u32_hash(__u32 key, unsigned mask)
-{
-        return ((key * CFS_GOLDEN_RATIO_PRIME_32) & mask);
-}
-
-/*
- * Generic u64 hash algorithm.
- */
-static inline unsigned
-lh_u64_hash(__u64 key, unsigned mask)
-{
-        return ((unsigned)(key * CFS_GOLDEN_RATIO_PRIME_64) & mask);
-}
-
-#define lh_for_each_bucket(lh, lhb, pos)         \
-        for (pos = 0;                            \
-             pos <= lh->lh_cur_mask &&           \
-             ({ lhb = &lh->lh_buckets[i]; 1; }); \
-             pos++)
-
-#endif /* __CLASS_HASH_H */
index e81f7e0..4886479 100644 (file)
@@ -201,15 +201,6 @@ struct ccc_page {
         struct list_head     cpg_pending_linkage;
         /** VM page */
         cfs_page_t          *cpg_page;
-        /**
-         * checksum for paranoid I/O debugging enabled by
-         * ENABLE_LLITE_CHECKSUM configuration option.
-         *
-         * XXX This cannot be implemented reliably because checksum cannot be
-         * updated from ->set_page_dirty() that is called without page VM
-         * lock.
-         */
-        __u32                cpg_checksum;
 };
 
 static inline struct ccc_page *cl2ccc_page(const struct cl_page_slice *slice)
index cb184a3..e72fdbf 100644 (file)
@@ -134,8 +134,13 @@ struct rcu_head { };
 
 typedef __u64 kdev_t;
 
+#ifndef min
 #define min(x,y) ((x)<(y) ? (x) : (y))
+#endif
+
+#ifndef max
 #define max(x,y) ((x)>(y) ? (x) : (y))
+#endif
 
 #ifndef min_t
 #define min_t(type,x,y) \
index d65fc62..46b72a7 100644 (file)
@@ -777,14 +777,5 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)
                 return -ENOSYS;
 }
 
-
-#ifdef HAVE_VFS_RENAME_MUTEX
-#define VFS_RENAME_LOCK(inode) mutex_lock(&((inode)->i_sb->s_vfs_rename_mutex))
-#define VFS_RENAME_UNLOCK(inode) mutex_unlock(&((inode)->i_sb->s_vfs_rename_mutex))
-#else
-#define VFS_RENAME_LOCK(inode) down(&((inode)->i_sb->s_vfs_rename_sem))
-#define VFS_RENAME_UNLOCK(inode) up(&((inode)->i_sb->s_vfs_rename_sem))
-#endif
-
 #endif /* __KERNEL__ */
 #endif /* _COMPAT25_H */
index ececca3..f7ef0ca 100644 (file)
@@ -177,7 +177,6 @@ static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd,
 #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_OP_UNLINK_PARTIAL_CHILD  21
 #define FSFILT_OP_UNLINK_PARTIAL_PARENT 22
index 20fd103..6e4ec38 100644 (file)
@@ -95,8 +95,9 @@ extern int llapi_file_lookup(int dirfd, const char *name);
 #define VERBOSE_OFFSET  0x4
 #define VERBOSE_POOL    0x8
 #define VERBOSE_DETAIL  0x10
+#define VERBOSE_OBJID   0x20
 #define VERBOSE_ALL     (VERBOSE_COUNT | VERBOSE_SIZE | VERBOSE_OFFSET | \
-                         VERBOSE_POOL)
+                         VERBOSE_POOL | VERBOSE_OBJID)
 
 struct find_param {
         unsigned int maxdepth;
@@ -151,6 +152,7 @@ struct find_param {
         char poolname[LOV_MAXPOOLNAME + 1];
 };
 
+extern int llapi_ostlist(char *path, struct find_param *param);
 extern int llapi_uuid_match(char *real_uuid, char *search_uuid);
 extern int llapi_getstripe(char *path, struct find_param *param);
 extern int llapi_find(char *path, struct find_param *param);
index 8bac0f4..265ea65 100644 (file)
@@ -45,7 +45,7 @@
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
-#ifndef HAVE_LINUX_FIEMAP_H
+#if !defined(HAVE_LINUX_FIEMAP_H) || !defined(__KERNEL__)
 
 struct ll_fiemap_extent {
         __u64 fe_logical;  /* logical offset in bytes for the start of
@@ -75,11 +75,6 @@ struct ll_user_fiemap {
 
 #define FIEMAP_FLAG_SYNC         0x00000001 /* sync file data before map */
 #define FIEMAP_FLAG_XATTR        0x00000002 /* map extended attribute tree */
-#define FIEMAP_FLAG_DEVICE_ORDER 0x40000000 /* return device ordered mapping */
-
-#define FIEMAP_FLAGS_COMPAT    (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \
-                                FIEMAP_FLAG_DEVICE_ORDER)
-
 
 #define FIEMAP_EXTENT_LAST              0x00000001 /* Last extent in file. */
 #define FIEMAP_EXTENT_UNKNOWN           0x00000002 /* Data location unknown. */
@@ -101,15 +96,11 @@ struct ll_user_fiemap {
                                                     * support extents. Result
                                                     * merged for efficiency. */
 
-/* Lustre specific flags - use a high bit, don't conflict with upstream flag */
-#define FIEMAP_EXTENT_NO_DIRECT         0x40000000 /* Data mapping undefined */
-#define FIEMAP_EXTENT_NET               0x80000000 /* Data stored remotely.
-                                                    * Sets NO_DIRECT flag */
-
 #else
 
 #define ll_fiemap_extent fiemap_extent
 #define ll_user_fiemap   fiemap
+#define fe_device        fe_reserved[0]
 
 #endif /* HAVE_LINUX_FIEMAP_H */
 
@@ -125,4 +116,18 @@ static inline unsigned fiemap_size_to_count(size_t array_size)
                                                sizeof(struct ll_fiemap_extent));
 }
 
+#define FIEMAP_FLAG_DEVICE_ORDER 0x40000000 /* return device ordered mapping */
+
+#ifdef FIEMAP_FLAGS_COMPAT
+#undef FIEMAP_FLAGS_COMPAT
+#endif
+
+#define FIEMAP_FLAGS_COMPAT    (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \
+                                FIEMAP_FLAG_DEVICE_ORDER)
+
+/* Lustre specific flags - use a high bit, don't conflict with upstream flag */
+#define FIEMAP_EXTENT_NO_DIRECT         0x40000000 /* Data mapping undefined */
+#define FIEMAP_EXTENT_NET               0x80000000 /* Data stored remotely.
+                                                    * Sets NO_DIRECT flag */
+
 #endif /* _LUSTRE_FIEMAP_H */
index 076217f..d685e46 100644 (file)
@@ -294,6 +294,45 @@ struct lustre_mdt_attrs {
 };
 
 /**
+ * Fill \a lma with its first content.
+ * Only fid is stored.
+ */
+static inline void lustre_lma_init(struct lustre_mdt_attrs *lma,
+                                   const struct lu_fid *fid)
+{
+        lma->lma_compat      = 0;
+        lma->lma_incompat    = 0;
+        memcpy(&lma->lma_self_fid, fid, sizeof(*fid));
+        lma->lma_flags       = 0;
+        lma->lma_som_sectors = 0;
+
+        /* If a field is added in struct lustre_mdt_attrs, zero it explicitly
+         * and change the test below. */
+        LASSERT(sizeof(*lma) ==
+                (offsetof(struct lustre_mdt_attrs, lma_som_sectors) +
+                 sizeof(lma->lma_som_sectors)));
+};
+
+extern void lustre_swab_lu_fid(struct lu_fid *fid);
+
+/**
+ * Swab, if needed, lustre_mdt_attr struct to on-disk format.
+ * Otherwise, do not touch it.
+ */
+static inline void lustre_lma_swab(struct lustre_mdt_attrs *lma)
+{
+        /* Use LUSTRE_MSG_MAGIC to detect local endianess. */
+        if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC)) {
+                __swab32s(&lma->lma_compat);
+                __swab32s(&lma->lma_incompat);
+                lustre_swab_lu_fid(&lma->lma_self_fid);
+                __swab64s(&lma->lma_flags);
+                __swab64s(&lma->lma_som_sectors);
+        }
+};
+
+
+/**
  * fid constants
  */
 enum {
@@ -729,7 +768,11 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_TRUNCLOCK           0x400ULL /*locks on server for punch */
 #define OBD_CONNECT_TRANSNO             0x800ULL /*replay sends init transno */
 #define OBD_CONNECT_IBITS              0x1000ULL /*support for inodebits locks*/
-#define OBD_CONNECT_JOIN               0x2000ULL /*files can be concatenated */
+#define OBD_CONNECT_JOIN               0x2000ULL /*files can be concatenated.
+                                                  *We do not support JOIN FILE
+                                                  *anymore, reserve this flags
+                                                  *just for preventing such bit
+                                                  *to be reused.*/
 #define OBD_CONNECT_ATTRFID            0x4000ULL /*Server can GetAttr By Fid*/
 #define OBD_CONNECT_NODEVOH            0x8000ULL /*No open hndl on specl nodes*/
 #define OBD_CONNECT_RMT_CLIENT        0x10000ULL /*Remote client */
@@ -897,7 +940,7 @@ enum obdo_flags {
 
 #define LOV_MAGIC_V1      0x0BD10BD0
 #define LOV_MAGIC         LOV_MAGIC_V1
-#define LOV_MAGIC_JOIN    0x0BD20BD0
+#define LOV_MAGIC_JOIN_V1 0x0BD20BD0
 #define LOV_MAGIC_V3      0x0BD30BD0
 
 #define LOV_PATTERN_RAID0 0x001   /* stripes are used round-robin */
@@ -1427,27 +1470,6 @@ struct mdt_remote_perm {
 
 extern void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p);
 
-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 */
-};
-
-extern void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa);
-
 struct mdt_rec_setattr {
         __u32           sa_opcode;
         __u32           sa_cap;
@@ -1479,7 +1501,7 @@ struct mdt_rec_setattr {
 extern void lustre_swab_mdt_rec_setattr (struct mdt_rec_setattr *sa);
 
 /*
- * Attribute flags used in mds_rec_setattr::sa_valid.
+ * Attribute flags used in mdt_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.
@@ -1524,7 +1546,11 @@ extern void lustre_swab_mdt_rec_setattr (struct mdt_rec_setattr *sa);
 
 #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_JOIN_FILE     0400000000 /* open for join file.
+                                           * We do not support JOIN FILE
+                                           * anymore, reserve this flags
+                                           * just for preventing such bit
+                                           * to be reused. */
 #define MDS_CREATE_RMT_ACL    01000000000 /* indicate create on remote server
                                            * with default ACL */
 #define MDS_CREATE_SLAVE_OBJ  02000000000 /* indicate create slave object
@@ -1561,27 +1587,6 @@ enum {
         MDS_CLOSE_CLEANUP = 1 << 6
 };
 
-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 mdt_rec_create {
         __u32           cr_opcode;
         __u32           cr_cap;
@@ -1608,40 +1613,6 @@ struct mdt_rec_create {
         __u32           cr_padding_4;
 };
 
-extern void lustre_swab_mdt_rec_create (struct mdt_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 mdt_rec_join {
-        struct lu_fid  jr_fid;
-        __u64          jr_headsize;
-};
-
-extern void lustre_swab_mdt_rec_join (struct mdt_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 mdt_rec_link {
         __u32           lk_opcode;
         __u32           lk_cap;
@@ -1668,24 +1639,6 @@ struct mdt_rec_link {
         __u32           lk_padding_9;
 };
 
-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 mdt_rec_unlink {
         __u32           ul_opcode;
         __u32           ul_cap;
@@ -1712,24 +1665,6 @@ struct mdt_rec_unlink {
         __u32           ul_padding_9;
 };
 
-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);
-
 struct mdt_rec_rename {
         __u32           rn_opcode;
         __u32           rn_cap;
@@ -2145,14 +2080,6 @@ struct llog_catid {
         __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?)
  */
@@ -2169,7 +2096,7 @@ typedef enum {
         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_JOIN_REC      = LLOG_OP_MAGIC | 0x50000, /* obsolete */
         CHANGELOG_REC      = LLOG_OP_MAGIC | 0x60000,
         CHANGELOG_USER_REC = LLOG_OP_MAGIC | 0x70000,
         LLOG_HDR_MAGIC     = LLOG_OP_MAGIC | 0x45539,
@@ -2212,23 +2139,6 @@ struct llog_logid_rec {
         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;
@@ -2404,29 +2314,6 @@ struct llogd_conn_body {
         __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));
-
 /* Note: 64-bit types are 64-bit aligned in structure */
 struct obdo {
         obd_valid               o_valid;        /* hot fields in this obdo */
@@ -2507,7 +2394,6 @@ extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
 extern void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum);
 extern void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,
                                             int stripe_count);
-extern void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj);
 extern void lustre_swab_lov_mds_md(struct lov_mds_md *lmm);
 
 /* llog_swab.c */
@@ -2520,6 +2406,13 @@ extern void lustre_swab_llog_rec(struct llog_rec_hdr  *rec,
 struct lustre_cfg;
 extern void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);
 
+/* Functions for dumping PTLRPC fields */
+void dump_rniobuf(struct niobuf_remote *rnb);
+void dump_ioo(struct obd_ioobj *nb);
+void dump_obdo(struct obdo *oa);
+void dump_ost_body(struct ost_body *ob);
+void dump_rcs(__u32 *rc);
+
 /* this will be used when OBD_CONNECT_CHANGE_QS is set */
 struct qunit_data {
         /**
@@ -2558,7 +2451,7 @@ struct qunit_data {
 #define QDATA_CLR_CHANGE_QS(qdata)  ((qdata)->qd_flags &= ~LQUOTA_FLAGS_CHG_QS)
 
 extern void lustre_swab_qdata(struct qunit_data *d);
-extern struct qunit_data *quota_get_qdata(void*req, int is_req, int is_exp);
+extern struct qunit_data *quota_get_qdata(void *req, int is_req, int is_exp);
 extern int quota_copy_qdata(void *request, struct qunit_data *qdata,
                             int is_req, int is_exp);
 
@@ -2569,8 +2462,6 @@ typedef enum {
 } quota_cmd_t;
 #define QUOTA_FIRST_OPC QUOTA_DQACQ
 
-#define JOIN_FILE_ALIGN 4096
-
 #define QUOTA_REQUEST   1
 #define QUOTA_REPLY     0
 #define QUOTA_EXPORT    1
index c0e96b8..51e8952 100644 (file)
@@ -122,7 +122,6 @@ struct obd_statfs {
 #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_FLUSHCTX                 _IOW ('f', 166, long)
@@ -158,7 +157,7 @@ struct obd_statfs {
 
 #define LOV_USER_MAGIC_V1 0x0BD10BD0
 #define LOV_USER_MAGIC    LOV_USER_MAGIC_V1
-#define LOV_USER_MAGIC_JOIN 0x0BD20BD0
+#define LOV_USER_MAGIC_JOIN_V1 0x0BD20BD0
 #define LOV_USER_MAGIC_V3 0x0BD30BD0
 
 #define LOV_PATTERN_RAID0 0x001
@@ -528,6 +527,11 @@ enum changelog_message_type {
 
 
 /********* HSM **********/
+
+
+#define HSM_FLAGS_MASK  0
+
+
 enum hsm_message_type {
         HMT_ACTION_LIST = 100, /* message is a hsm_action_list */
 };
index 9b9b21b..44a06b7 100644 (file)
@@ -284,22 +284,6 @@ static inline int capa_opc_supported(struct lustre_capa *capa, __u64 opc)
         return (capa_opc(capa) & opc) == opc;
 }
 
-static inline struct lustre_capa *
-lustre_unpack_incoming_capa(struct ptlrpc_request *req, unsigned int offset)
-{
-        struct lustre_capa *capa;
-
-        capa = lustre_swab_reqbuf(req, offset, sizeof(*capa),
-                                  lustre_swab_lustre_capa);
-        if (capa == NULL)
-                CERROR("bufcount %u, bufsize %u\n",
-                       lustre_msg_bufcount(req->rq_reqmsg),
-                       (lustre_msg_bufcount(req->rq_reqmsg) <= offset) ?
-                                -1 : lustre_msg_buflen(req->rq_reqmsg, offset));
-
-        return capa;
-}
-
 struct filter_capa_key {
         struct list_head        k_list;
         struct lustre_capa_key  k_key;
index 5ded0ff..73c22bb 100644 (file)
@@ -38,6 +38,7 @@
 #define _LUSTRE_DEBUG_H
 
 #include <lustre_net.h>
+#include <obd.h>
 
 #if defined(__linux__)
 #include <linux/lustre_debug.h>
@@ -67,11 +68,8 @@ do { if (offset > ASSERT_MAX_SIZE_MB << 20) {                           \
 }} 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);
+void dump_lniobuf(struct niobuf_local *lnb);
 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);
index a085187..311a153 100644 (file)
@@ -300,6 +300,20 @@ struct lsd_client_data {
         __u8  lcd_padding[LR_CLIENT_SIZE - 128];
 };
 
+/* bug20354: the lcd_uuid for export of clients may be wrong */
+static inline void check_lcd(char *obd_name, int index,
+                             struct lsd_client_data *lcd)
+{
+        int length = sizeof(lcd->lcd_uuid);
+        if (strnlen((char*)lcd->lcd_uuid, length) == length) {
+                lcd->lcd_uuid[length - 1] = '\0';
+
+                LCONSOLE_ERROR("the client UUID (%s) on %s for exports"
+                               "stored in last_rcvd(index = %d) is bad!\n", 
+                               lcd->lcd_uuid, obd_name, index);
+        }
+}
+
 /* last_rcvd handling */
 static inline void lsd_le_to_cpu(struct lr_server_data *buf,
                                  struct lr_server_data *lsd)
index 5c6ea4b..710f921 100644 (file)
@@ -51,7 +51,6 @@
 #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 */
 #include <lu_ref.h>
 
@@ -369,7 +368,7 @@ struct ldlm_valblock_ops {
         int (*lvbo_init)(struct ldlm_resource *res);
         int (*lvbo_update)(struct ldlm_resource *res,
                            struct ptlrpc_request *r,
-                           int buf_idx, int increase);
+                           int increase);
 };
 
 typedef enum {
@@ -545,6 +544,8 @@ struct ldlm_interval_tree {
         struct interval_node *lit_root; /* actually ldlm_interval */
 };
 
+#define LUSTRE_TRACKS_LOCK_EXP_REFS (1)
+
 struct ldlm_lock {
         /**
          * Must be first in the structure.
@@ -666,7 +667,6 @@ struct ldlm_lock {
          */
         __u32                 l_lvb_len;
         void                 *l_lvb_data;
-        void                 *l_lvb_swabber;
 
         void                 *l_ast_data;
         spinlock_t            l_extents_list_lock;
@@ -715,6 +715,16 @@ struct ldlm_lock {
         struct list_head      l_sl_mode;
         struct list_head      l_sl_policy;
         struct lu_ref         l_reference;
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        /* Debugging stuff for bug 20498, for tracking export
+           references. */
+        /** number of export references taken */
+        int                   l_exp_refs_nr;
+        /** link all locks referencing one export */
+        struct list_head      l_exp_refs_link;
+        /** referenced export object */
+        struct obd_export    *l_exp_refs_target;
+#endif
 };
 
 struct ldlm_resource {
@@ -904,12 +914,11 @@ ldlm_handle2lock_long(const struct lustre_handle *h, int flags)
 }
 
 static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
-                                       struct ptlrpc_request *r, int buf_idx,
-                                       int increase)
+                                       struct ptlrpc_request *r, int increase)
 {
         if (res->lr_namespace->ns_lvbo &&
             res->lr_namespace->ns_lvbo->lvbo_update) {
-                return res->lr_namespace->ns_lvbo->lvbo_update(res, r, buf_idx,
+                return res->lr_namespace->ns_lvbo->lvbo_update(res, r,
                                                                increase);
         }
         return 0;
@@ -918,6 +927,9 @@ static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
 int ldlm_error2errno(ldlm_error_t error);
 ldlm_error_t ldlm_errno2error(int err_no); /* don't call it `errno': this
                                             * confuses user-space. */
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+void ldlm_dump_export_locks(struct obd_export *exp);
+#endif
 
 /**
  * Release a temporary lock reference obtained by ldlm_handle2lock() or
@@ -1050,8 +1062,8 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                      struct ldlm_enqueue_info *einfo,
                      const 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);
+                     void *lvb, __u32 lvb_len, struct lustre_handle *lockh,
+                     int async);
 int ldlm_prep_enqueue_req(struct obd_export *exp,
                           struct ptlrpc_request *req,
                           struct list_head *cancels,
@@ -1066,8 +1078,7 @@ int ldlm_handle_enqueue0(struct ldlm_namespace *ns, struct ptlrpc_request *req,
 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 lustre_handle *lockh, int rc);
 int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
                            const struct ldlm_res_id *res_id,
                            ldlm_type_t type, ldlm_policy_data_t *policy,
@@ -1075,7 +1086,7 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
                            ldlm_blocking_callback blocking,
                            ldlm_completion_callback completion,
                            ldlm_glimpse_callback glimpse,
-                           void *data, __u32 lvb_len, void *lvb_swabber,
+                           void *data, __u32 lvb_len,
                            const __u64 *client_cookie,
                            struct lustre_handle *lockh);
 int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new,
index 72a83af..75457a2 100644 (file)
@@ -40,7 +40,6 @@
 #include <lprocfs_status.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_dlm.h>
-#include <class_hash.h>
 
 struct mds_client_data;
 struct mdt_client_data;
@@ -152,7 +151,10 @@ struct obd_export {
         atomic_t                  exp_rpc_count; /** RPC references */
         atomic_t                  exp_cb_count; /** Commit callback references */
         atomic_t                  exp_locks_count; /** Lock references */
-
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        struct list_head          exp_locks_list;
+        spinlock_t                exp_locks_list_guard;
+#endif
         atomic_t                  exp_replay_count;
         struct obd_uuid           exp_client_uuid;
         struct list_head          exp_obd_chain;
@@ -166,7 +168,7 @@ struct obd_export {
         struct lprocfs_stats     *exp_md_stats;
         struct ptlrpc_connection *exp_connection;
         __u32                     exp_conn_cnt;
-        lustre_hash_t            *exp_lock_hash; /* existing lock hash */
+        cfs_hash_t               *exp_lock_hash; /* existing lock hash */
         spinlock_t                exp_lock_hash_lock;
         struct list_head          exp_outstanding_replies;
         struct list_head          exp_uncommitted_replies;
index 969565e..3f7fc45 100644 (file)
@@ -96,7 +96,5 @@ static inline int md_should_create(__u32 flags)
 
 /* these are local flags, used only on the client, private */
 #define M_CHECK_STALE           0200000000
-#define M_JOIN_FILE             0400000000 /* its counterpart is
-                                            * MDS_OPEN_JOIN_FILE */
 
 #endif
index 2433ea8..af283c5 100644 (file)
@@ -415,7 +415,8 @@ struct ptlrpc_request {
                                  rq_pack_udesc:1,
                                  rq_pack_bulk:1,
                                  /* doesn't expect reply FIXME */
-                                 rq_no_reply:1;
+                                 rq_no_reply:1,
+                                 rq_pill_init:1;     /* pill initialized */
 
         uid_t                    rq_auth_uid;        /* authed uid */
         uid_t                    rq_auth_mapped_uid; /* authed uid mapped to */
@@ -1133,10 +1134,6 @@ 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_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);
index 97f1398..a7fc220 100644 (file)
@@ -51,7 +51,6 @@
 #include <lustre/lustre_idl.h>
 #include <lvfs.h>
 #include <obd_support.h>
-#include <class_hash.h>
 
 struct obd_device;
 struct client_obd;
@@ -296,7 +295,7 @@ struct lustre_quota_ctxt {
         /** See comment of lqc_itune_sz */
         unsigned long lqc_btune_sz;
         /** all lustre_qunit_size structures */
-        struct lustre_hash *lqc_lqs_hash;
+        cfs_hash_t   *lqc_lqs_hash;
 
         /** @{ */
         /**
@@ -526,10 +525,10 @@ typedef struct {
          * 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 *, const unsigned int [],
-                               int [], int, quota_acquire,
-                               struct obd_trans_info *, int, struct inode *,
-                               int);
+        int (*quota_chkquota) (struct obd_device *, struct obd_export *,
+                               const unsigned int [], int [],
+                               int, quota_acquire, struct obd_trans_info *,
+                               int, struct inode *, int);
 
         /**
          * For quota client, the actions after the pending write is committed
@@ -765,6 +764,7 @@ static inline int lquota_getflag(quota_interface_t *interface,
 #ifdef __KERNEL__
 static inline int lquota_chkquota(quota_interface_t *interface,
                                   struct obd_device *obd,
+                                  struct obd_export *exp,
                                   const unsigned int id[], int pending[],
                                   int count, struct obd_trans_info *oti,
                                   int isblk, void *data, int frags)
@@ -774,7 +774,7 @@ static inline int lquota_chkquota(quota_interface_t *interface,
 
         QUOTA_CHECK_OP(interface, chkquota);
         QUOTA_CHECK_OP(interface, acquire);
-        rc = QUOTA_OP(interface, chkquota)(obd, id, pending, count,
+        rc = QUOTA_OP(interface, chkquota)(obd, exp, id, pending, count,
                                            QUOTA_OP(interface, acquire), oti,
                                            isblk, (struct inode *)data, frags);
         RETURN(rc);
index e90f554..0cd88b4 100644 (file)
@@ -75,6 +75,8 @@ void req_capsule_init(struct req_capsule *pill, struct ptlrpc_request *req,
 void req_capsule_fini(struct req_capsule *pill);
 
 void req_capsule_set(struct req_capsule *pill, const struct req_format *fmt);
+void req_capsule_client_dump(struct req_capsule *pill);
+void req_capsule_server_dump(struct req_capsule *pill);
 void req_capsule_init_area(struct req_capsule *pill);
 int req_capsule_filled_sizes(struct req_capsule *pill, enum req_location loc);
 int  req_capsule_server_pack(struct req_capsule *pill);
@@ -241,7 +243,6 @@ extern const struct req_msg_field RMF_DLM_LVB;
 extern const struct req_msg_field RMF_LDLM_INTENT;
 extern const struct req_msg_field RMF_MDT_MD;
 extern const struct req_msg_field RMF_REC_REINT;
-extern const struct req_msg_field RMF_REC_JOINFILE;
 extern const struct req_msg_field RMF_EADATA;
 extern const struct req_msg_field RMF_ACL;
 extern const struct req_msg_field RMF_LOGCOOKIES;
@@ -272,6 +273,7 @@ extern const struct req_msg_field RMF_OST_BODY;
 extern const struct req_msg_field RMF_OBD_IOOBJ;
 extern const struct req_msg_field RMF_OBD_ID;
 extern const struct req_msg_field RMF_NIOBUF_REMOTE;
+extern const struct req_msg_field RMF_RCS;
 extern const struct req_msg_field RMF_FIEMAP_KEY;
 extern const struct req_msg_field RMF_FIEMAP_VAL;
 
index 6f818b5..0e3dd26 100644 (file)
@@ -101,6 +101,10 @@ struct md_capainfo {
         struct lustre_capa     *mc_capa[MD_CAPAINFO_MAX];
 };
 
+struct md_quota {
+        struct obd_export       *mq_exp;
+};
+
 /**
  * Implemented in mdd/mdd_handler.c.
  *
@@ -109,6 +113,7 @@ struct md_capainfo {
  */
 struct md_ucred *md_ucred(const struct lu_env *env);
 struct md_capainfo *md_capainfo(const struct lu_env *env);
+struct md_quota *md_quota(const struct lu_env *env);
 
 /** metadata attributes */
 enum ma_valid {
@@ -118,7 +123,10 @@ enum ma_valid {
         MA_FLAGS     = (1 << 3),
         MA_LMV       = (1 << 4),
         MA_ACL_DEF   = (1 << 5),
-        MA_LOV_DEF   = (1 << 6)
+        MA_LOV_DEF   = (1 << 6),
+/* (Layout lock will used #7 here) */
+        MA_HSM       = (1 << 8),
+        MA_SOM       = (1 << 9)
 };
 
 typedef enum {
@@ -139,6 +147,11 @@ typedef enum {
         MDT_PDO_LOCK = (1 << 1)
 } mdl_type_t;
 
+struct md_hsm {
+        __u32  mh_flags;
+};
+#define ma_hsm_flags ma_hsm.mh_flags
+
 struct md_attr {
         __u64                   ma_valid;
         __u64                   ma_need;
@@ -153,6 +166,8 @@ struct md_attr {
         struct llog_cookie     *ma_cookie;
         int                     ma_cookie_size;
         struct lustre_capa     *ma_capa;
+        struct md_hsm           ma_hsm;
+/* XXX:  struct md_som_data   *ma_som; */
 };
 
 /** Additional parameters for create */
@@ -352,7 +367,6 @@ struct md_device_operations {
 
                 int (*mqo_check)(const struct lu_env *env,
                                  struct md_device *m,
-                                 struct obd_export *exp,
                                  __u32 type);
 
                 int (*mqo_on)(const struct lu_env *env,
index e084a10..095af79 100644 (file)
@@ -67,7 +67,6 @@
 #include <lustre_quota.h>
 #include <lustre_fld.h>
 #include <lustre_capa.h>
-#include <class_hash.h>
 
 #include <libcfs/bitmap.h>
 
@@ -128,21 +127,6 @@ static inline void loi_init(struct lov_oinfo *loi)
         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;
         pid_t            lsm_lock_owner; /* debugging */
@@ -161,7 +145,6 @@ struct lov_stripe_md {
                 char  lw_pool_name[LOV_MAXPOOLNAME]; /* pool name */
         } lsm_wire;
 
-        struct lov_array_info *lsm_array; /*Only for joined file array info*/
         struct lov_oinfo *lsm_oinfo[0];
 };
 
@@ -749,7 +732,7 @@ struct lov_obd {
         __u32                   lov_tgt_size;   /* size of tgts array */
         int                     lov_connects;
         int                     lov_pool_count;
-        lustre_hash_t          *lov_pools_hash_body; /* used for key access */
+        cfs_hash_t             *lov_pools_hash_body; /* used for key access */
         struct list_head        lov_pool_list; /* used for sequential access */
         cfs_proc_dir_entry_t   *lov_pool_proc_entry;
         enum lustre_sec_part    lov_sp_me;
@@ -1074,11 +1057,11 @@ struct obd_device {
                                            * (for /proc/status only!!) */
                       obd_process_conf:1;  /* device is processing mgs config */
         /* uuid-export hash body */
-        struct lustre_hash     *obd_uuid_hash;
+        cfs_hash_t             *obd_uuid_hash;
         /* nid-export hash body */
-        struct lustre_hash     *obd_nid_hash;
+        cfs_hash_t             *obd_nid_hash;
         /* nid stats body */
-        struct lustre_hash     *obd_nid_stats_hash;
+        cfs_hash_t             *obd_nid_stats_hash;
         struct list_head        obd_nid_stats;
         atomic_t                obd_refcount;
         cfs_waitq_t             obd_refcount_waitq;
@@ -1100,6 +1083,7 @@ struct obd_device {
         struct lvfs_run_ctxt    obd_lvfs_ctxt;
         struct obd_llog_group   obd_olg; /* default llog group */
         struct obd_device       *obd_observer;
+        struct rw_semaphore     obd_observer_link_sem;
         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 */
@@ -1346,8 +1330,6 @@ struct obd_ops {
                         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);
         /* FIXME: add fid capability support for create & destroy! */
@@ -1610,10 +1592,6 @@ struct lsm_operations {
                                     obd_off *);
         void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *,
                                      obd_off *);
-        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,
@@ -1621,15 +1599,12 @@ struct lsm_operations {
 };
 
 extern const struct lsm_operations lsm_v1_ops;
-extern const struct lsm_operations lsm_join_ops;
 extern const struct lsm_operations lsm_v3_ops;
 static inline const struct lsm_operations *lsm_op_find(int magic)
 {
         switch(magic) {
         case LOV_MAGIC_V1:
                return &lsm_v1_ops;
-        case LOV_MAGIC_JOIN:
-               return &lsm_join_ops;
         case LOV_MAGIC_V3:
                return &lsm_v3_ops;
         default:
index c8a4baa..e8c57af 100644 (file)
@@ -115,7 +115,7 @@ struct obd_device *class_incref(struct obd_device *obd,
                                 const char *scope, const void *source);
 void class_decref(struct obd_device *obd,
                   const char *scope, const void *source);
-void dump_exports(struct obd_device *obd);
+void dump_exports(struct obd_device *obd, int locks);
 
 /*obdecho*/
 #ifdef LPROCFS
@@ -172,6 +172,19 @@ struct lustre_profile *class_get_profile(const char * prof);
 void class_del_profile(const char *prof);
 void class_del_profiles(void);
 
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+
+void __class_export_add_lock_ref(struct obd_export *, struct ldlm_lock *);
+void __class_export_del_lock_ref(struct obd_export *, struct ldlm_lock *);
+extern void (*class_export_dump_hook)(struct obd_export *);
+
+#else
+
+#define __class_export_add_lock_ref(exp, lock)             do {} while(0)
+#define __class_export_del_lock_ref(exp, lock)             do {} while(0)
+
+#endif
+
 #define class_export_rpc_get(exp)                                       \
 ({                                                                      \
         atomic_inc(&(exp)->exp_rpc_count);                              \
@@ -189,18 +202,20 @@ void class_del_profiles(void);
         class_export_put(exp);                                          \
 })
 
-#define class_export_lock_get(exp)                                      \
+#define class_export_lock_get(exp, lock)                                \
 ({                                                                      \
         atomic_inc(&(exp)->exp_locks_count);                            \
+        __class_export_add_lock_ref(exp, lock);                         \
         CDEBUG(D_INFO, "lock GETting export %p : new locks_count %d\n", \
                (exp), atomic_read(&(exp)->exp_locks_count));            \
         class_export_get(exp);                                          \
 })
 
-#define class_export_lock_put(exp)                                      \
+#define class_export_lock_put(exp, lock)                                \
 ({                                                                      \
         LASSERT(atomic_read(&exp->exp_locks_count) > 0);                \
         atomic_dec(&(exp)->exp_locks_count);                            \
+        __class_export_del_lock_ref(exp, lock);                         \
         CDEBUG(D_INFO, "lock PUTting export %p : new locks_count %d\n", \
                (exp), atomic_read(&(exp)->exp_locks_count));            \
         class_export_put(exp);                                          \
@@ -243,6 +258,7 @@ 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);
+int class_connected_export(struct obd_export *exp);
 void class_disconnect_exports(struct obd_device *obddev);
 int class_manual_cleanup(struct obd_device *obd);
 void class_disconnect_stale_exports(struct obd_device *,
@@ -684,20 +700,6 @@ static inline int obd_free_memmd(struct obd_export *exp,
         return rc;
 }
 
-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_DT_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;
@@ -1643,9 +1645,34 @@ static inline int obd_register_observer(struct obd_device *obd,
 {
         ENTRY;
         OBD_CHECK_DEV(obd);
-        if (obd->obd_observer && observer)
+        down_write(&obd->obd_observer_link_sem);
+        if (obd->obd_observer && observer) {
+                up_write(&obd->obd_observer_link_sem);
                 RETURN(-EALREADY);
+        }
         obd->obd_observer = observer;
+        up_write(&obd->obd_observer_link_sem);
+        RETURN(0);
+}
+
+static inline int obd_pin_observer(struct obd_device *obd,
+                                   struct obd_device **observer)
+{
+        ENTRY;
+        down_read(&obd->obd_observer_link_sem);
+        if (!obd->obd_observer) {
+                *observer = NULL;
+                up_read(&obd->obd_observer_link_sem);
+                RETURN(-ENOENT);
+        }
+        *observer = obd->obd_observer;
+        RETURN(0);
+}
+
+static inline int obd_unpin_observer(struct obd_device *obd)
+{
+        ENTRY;
+        up_read(&obd->obd_observer_link_sem);
         RETURN(0);
 }
 
index 59c591d..295ab00 100644 (file)
@@ -94,6 +94,22 @@ int __obd_fail_timeout_set(__u32 id, __u32 value, int ms, int set);
 int obd_alloc_fail(const void *ptr, const char *name, const char *type,
                    size_t size, const char *file, int line);
 
+/* Some hash init argument constants */
+#define HASH_POOLS_CUR_BITS 3
+#define HASH_POOLS_MAX_BITS 7
+#define HASH_UUID_CUR_BITS 7
+#define HASH_UUID_MAX_BITS 12
+#define HASH_NID_CUR_BITS 7
+#define HASH_NID_MAX_BITS 12
+#define HASH_NID_STATS_CUR_BITS 7
+#define HASH_NID_STATS_MAX_BITS 12
+#define HASH_LQS_CUR_BITS 7
+#define HASH_LQS_MAX_BITS 12
+#define HASH_CONN_CUR_BITS 5
+#define HASH_CONN_MAX_BITS 15
+#define HASH_EXP_LOCK_CUR_BITS  7
+#define HASH_EXP_LOCK_MAX_BITS  16
+
 /* Timeout definitions */
 #define OBD_TIMEOUT_DEFAULT             100
 #define LDLM_TIMEOUT_DEFAULT            20
index c86ff16..5810494 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:06:09 2009
+# Thu Nov  5 09:05:37 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -36,6 +36,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -62,7 +63,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -166,8 +166,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -208,6 +208,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HIGHPTE=y
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
@@ -253,7 +255,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -350,6 +352,8 @@ CONFIG_HOTPLUG_PCI_PCIE=m
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -529,8 +533,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -684,6 +690,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -772,6 +780,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -1048,7 +1057,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1159,7 +1167,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1169,12 +1179,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1199,8 +1214,12 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
+CONFIG_FCOE_FNIC=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -1221,7 +1240,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1238,6 +1257,7 @@ CONFIG_PCMCIA_FDOMAIN=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1473,6 +1493,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1485,6 +1506,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1502,7 +1524,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1587,18 +1613,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2467,6 +2493,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2749,7 +2779,31 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2767,6 +2821,7 @@ CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
@@ -2805,17 +2860,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2830,10 +2897,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2858,7 +2926,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3108,6 +3176,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3196,6 +3265,7 @@ 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
index c86ff16..5810494 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:06:09 2009
+# Thu Nov  5 09:05:37 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -36,6 +36,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -62,7 +63,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -166,8 +166,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -208,6 +208,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HIGHPTE=y
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
@@ -253,7 +255,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -350,6 +352,8 @@ CONFIG_HOTPLUG_PCI_PCIE=m
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -529,8 +533,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -684,6 +690,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -772,6 +780,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -1048,7 +1057,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1159,7 +1167,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1169,12 +1179,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1199,8 +1214,12 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
+CONFIG_FCOE_FNIC=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -1221,7 +1240,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1238,6 +1257,7 @@ CONFIG_PCMCIA_FDOMAIN=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1473,6 +1493,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1485,6 +1506,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1502,7 +1524,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1587,18 +1613,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2467,6 +2493,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2749,7 +2779,31 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2767,6 +2821,7 @@ CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
@@ -2805,17 +2860,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2830,10 +2897,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2858,7 +2926,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3108,6 +3176,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3196,6 +3265,7 @@ 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
index 0c8934a..24a2b5f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:15:27 2009
+# Thu Nov  5 09:06:18 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -24,6 +24,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -49,7 +50,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -156,6 +156,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -245,6 +247,8 @@ 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_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCI Hotplug Support
@@ -411,8 +415,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -566,6 +572,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -654,6 +662,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -828,7 +837,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -933,7 +941,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -943,12 +953,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -971,6 +986,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -990,7 +1008,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1004,6 +1022,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1227,6 +1246,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1239,6 +1259,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1256,7 +1277,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1326,18 +1351,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2132,6 +2157,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2412,7 +2441,32 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2451,17 +2505,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+# CONFIG_INTEL_IOATDMA_V3 is not set
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2476,10 +2542,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2504,7 +2571,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2762,6 +2829,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
index 0c8934a..24a2b5f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:15:27 2009
+# Thu Nov  5 09:06:18 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -24,6 +24,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -49,7 +50,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -156,6 +156,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -245,6 +247,8 @@ 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_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCI Hotplug Support
@@ -411,8 +415,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -566,6 +572,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -654,6 +662,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -828,7 +837,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -933,7 +941,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -943,12 +953,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -971,6 +986,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -990,7 +1008,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1004,6 +1022,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1227,6 +1246,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1239,6 +1259,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1256,7 +1277,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1326,18 +1351,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2132,6 +2157,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2412,7 +2441,32 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2451,17 +2505,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+# CONFIG_INTEL_IOATDMA_V3 is not set
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2476,10 +2542,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2504,7 +2571,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2762,6 +2829,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
index bf7d400..76f4139 100644 (file)
@@ -1,13 +1,14 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:11:08 2009
+# Thu Nov  5 09:02:58 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
 CONFIG_X86=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_GET_USER_PAGES_FAST=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_MMU=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -41,6 +42,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -67,7 +69,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -137,8 +138,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -169,6 +170,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=255
 CONFIG_HOTPLUG_CPU=y
@@ -224,7 +227,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -287,12 +290,19 @@ CONFIG_PCI_MMCONFIG=y
 CONFIG_VIRTIO=m
 CONFIG_VIRTIO_RING=m
 CONFIG_VIRTIO_PCI=m
+CONFIG_IOMMU_API=y
+CONFIG_DMAR=y
+# CONFIG_DMAR_DEFAULT_ON is not set
+CONFIG_DMAR_GFX_WA=y
+CONFIG_DMAR_FLOPPY_WA=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=m
 # CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -468,8 +478,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -623,6 +635,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -711,6 +725,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -985,7 +1000,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1094,7 +1108,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1104,12 +1120,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1132,6 +1153,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
 CONFIG_FCOE_FNIC=m
@@ -1155,7 +1179,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1169,6 +1193,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1402,6 +1427,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1414,6 +1440,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1431,7 +1458,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1515,18 +1546,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2365,6 +2396,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2647,7 +2682,32 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2662,6 +2722,7 @@ CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_POLL=y
 
@@ -2698,17 +2759,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # Firmware Drivers
@@ -2732,10 +2805,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2744,7 +2818,11 @@ 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_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_NOLOCK=m
 CONFIG_GFS2_FS_LOCKING_DLM=m
@@ -2760,7 +2838,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3000,6 +3078,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3085,6 +3164,7 @@ 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
index bf7d400..76f4139 100644 (file)
@@ -1,13 +1,14 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Mon Aug 31 05:11:08 2009
+# Thu Nov  5 09:02:58 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
 CONFIG_X86=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_GET_USER_PAGES_FAST=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_MMU=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -41,6 +42,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -67,7 +69,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -137,8 +138,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -169,6 +170,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=255
 CONFIG_HOTPLUG_CPU=y
@@ -224,7 +227,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -287,12 +290,19 @@ CONFIG_PCI_MMCONFIG=y
 CONFIG_VIRTIO=m
 CONFIG_VIRTIO_RING=m
 CONFIG_VIRTIO_PCI=m
+CONFIG_IOMMU_API=y
+CONFIG_DMAR=y
+# CONFIG_DMAR_DEFAULT_ON is not set
+CONFIG_DMAR_GFX_WA=y
+CONFIG_DMAR_FLOPPY_WA=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=m
 # CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -468,8 +478,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -623,6 +635,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -711,6 +725,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -985,7 +1000,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1094,7 +1108,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1104,12 +1120,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1132,6 +1153,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
 CONFIG_FCOE_FNIC=m
@@ -1155,7 +1179,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1169,6 +1193,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1402,6 +1427,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1414,6 +1440,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1431,7 +1458,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
-# CONFIG_MLX4_CORE is not set
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_MLX4_CORE=m
+CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1515,18 +1546,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2365,6 +2396,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2647,7 +2682,32 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-# CONFIG_INFINIBAND is not set
+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 is not set
+CONFIG_INFINIBAND_CXGB3=m
+# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
+CONFIG_INFINIBAND_NES=m
+# CONFIG_INFINIBAND_NES_DEBUG is not set
+CONFIG_MLX4_INFINIBAND=m
+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_ISER=m
+CONFIG_INFINIBAND_SDP=m
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
+CONFIG_INFINIBAND_QLGC_VNIC=m
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
+CONFIG_INFINIBAND_MADEYE=m
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -2662,6 +2722,7 @@ CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_POLL=y
 
@@ -2698,17 +2759,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # Firmware Drivers
@@ -2732,10 +2805,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2744,7 +2818,11 @@ 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_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_NOLOCK=m
 CONFIG_GFS2_FS_LOCKING_DLM=m
@@ -2760,7 +2838,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3000,6 +3078,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3085,6 +3164,7 @@ 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
index c5689be..5810494 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:00:56 2009
+# Thu Nov  5 09:05:37 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -36,6 +36,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -47,7 +48,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -62,7 +63,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -166,8 +166,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -192,7 +192,8 @@ CONFIG_EDD=m
 CONFIG_EFI_VARS=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -207,6 +208,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HIGHPTE=y
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
@@ -252,13 +255,12 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 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_IBM is not set
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_BLACKLIST_YEAR=1999
 # CONFIG_ACPI_DEBUG is not set
@@ -309,10 +311,10 @@ 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=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 # CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
 CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
 CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
 CONFIG_X86_SPEEDSTEP_ICH=y
@@ -350,6 +352,8 @@ CONFIG_HOTPLUG_PCI_PCIE=m
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -498,7 +502,7 @@ 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_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -529,8 +533,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -684,6 +690,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -772,6 +780,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -840,14 +849,7 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# 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_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
@@ -1055,7 +1057,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1166,22 +1167,29 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1206,8 +1214,12 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
+CONFIG_FCOE_FNIC=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -1228,7 +1240,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1245,6 +1257,7 @@ CONFIG_PCMCIA_FDOMAIN=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1266,7 +1279,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1276,7 +1289,7 @@ CONFIG_PATA_ACPI=m
 # CONFIG_PATA_CS5520 is not set
 # CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CS5535 is not set
-CONFIG_PATA_CS5536=m
+# CONFIG_PATA_CS5536 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_ATA_GENERIC is not set
@@ -1294,7 +1307,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1304,7 +1317,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1334,7 +1347,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1343,10 +1356,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1458,7 +1471,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_TLAN=m
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
@@ -1479,6 +1493,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1491,6 +1506,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1508,8 +1524,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1594,15 +1613,19 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL3945_LEDS=y
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1974,7 +1997,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -2001,7 +2025,7 @@ CONFIG_IBMASR=m
 # CONFIG_WAFER_WDT is not set
 CONFIG_I6300ESB_WDT=m
 CONFIG_I8XX_TCO=m
-CONFIG_HP_WATCHDOG=m
+# CONFIG_HP_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_SBC8360_WDT is not set
@@ -2077,8 +2101,12 @@ CONFIG_HPET=y
 # CONFIG_HPET_RTC_IRQ is not set
 # CONFIG_HPET_MMAP is not set
 CONFIG_HANGCHECK_TIMER=m
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+CONFIG_TCG_INFINEON=m
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -2319,7 +2347,7 @@ CONFIG_FB_CIRRUS=m
 # CONFIG_FB_IMSTT is not set
 CONFIG_FB_VGA16=m
 CONFIG_FB_VESA=y
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
 # CONFIG_FB_IMAC is not set
 # CONFIG_FB_HGA is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -2465,6 +2493,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2754,8 +2786,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2768,10 +2799,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2790,6 +2821,7 @@ CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
@@ -2828,17 +2860,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2853,10 +2897,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2881,7 +2926,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2985,8 +3030,9 @@ 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_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -3099,7 +3145,7 @@ CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_LIST=y
-CONFIG_FRAME_POINTER=y
+# CONFIG_FRAME_POINTER is not set
 # CONFIG_FORCED_INLINING is not set
 CONFIG_BOOT_DELAY=y
 # CONFIG_RCU_TORTURE_TEST is not set
@@ -3130,6 +3176,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3183,7 +3230,7 @@ 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_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
@@ -3218,6 +3265,7 @@ 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
index c5689be..5810494 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:00:56 2009
+# Thu Nov  5 09:05:37 2009
 #
 CONFIG_X86_32=y
 CONFIG_GENERIC_TIME=y
@@ -36,6 +36,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -47,7 +48,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -62,7 +63,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -166,8 +166,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -192,7 +192,8 @@ CONFIG_EDD=m
 CONFIG_EFI_VARS=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -207,6 +208,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HIGHPTE=y
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
@@ -252,13 +255,12 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 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_IBM is not set
 CONFIG_ACPI_TOSHIBA=m
 CONFIG_ACPI_BLACKLIST_YEAR=1999
 # CONFIG_ACPI_DEBUG is not set
@@ -309,10 +311,10 @@ 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=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 # CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_SPEEDSTEP_CENTRINO=m
 CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
 CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
 CONFIG_X86_SPEEDSTEP_ICH=y
@@ -350,6 +352,8 @@ CONFIG_HOTPLUG_PCI_PCIE=m
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -498,7 +502,7 @@ 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_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -529,8 +533,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -684,6 +690,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -772,6 +780,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -840,14 +849,7 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# 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_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
 # CONFIG_IEEE80211_DEBUG is not set
 CONFIG_IEEE80211_CRYPT_WEP=m
@@ -1055,7 +1057,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1166,22 +1167,29 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1206,8 +1214,12 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
+CONFIG_FCOE_FNIC=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -1228,7 +1240,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1245,6 +1257,7 @@ CONFIG_PCMCIA_FDOMAIN=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1266,7 +1279,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1276,7 +1289,7 @@ CONFIG_PATA_ACPI=m
 # CONFIG_PATA_CS5520 is not set
 # CONFIG_PATA_CS5530 is not set
 # CONFIG_PATA_CS5535 is not set
-CONFIG_PATA_CS5536=m
+# CONFIG_PATA_CS5536 is not set
 # CONFIG_PATA_CYPRESS is not set
 # CONFIG_PATA_EFAR is not set
 # CONFIG_ATA_GENERIC is not set
@@ -1294,7 +1307,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1304,7 +1317,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1334,7 +1347,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1343,10 +1356,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1458,7 +1471,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_TLAN=m
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
@@ -1479,6 +1493,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1491,6 +1506,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1508,8 +1524,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1594,15 +1613,19 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL3945_LEDS=y
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1974,7 +1997,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -2001,7 +2025,7 @@ CONFIG_IBMASR=m
 # CONFIG_WAFER_WDT is not set
 CONFIG_I6300ESB_WDT=m
 CONFIG_I8XX_TCO=m
-CONFIG_HP_WATCHDOG=m
+# CONFIG_HP_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_SBC8360_WDT is not set
@@ -2077,8 +2101,12 @@ CONFIG_HPET=y
 # CONFIG_HPET_RTC_IRQ is not set
 # CONFIG_HPET_MMAP is not set
 CONFIG_HANGCHECK_TIMER=m
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+CONFIG_TCG_INFINEON=m
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -2319,7 +2347,7 @@ CONFIG_FB_CIRRUS=m
 # CONFIG_FB_IMSTT is not set
 CONFIG_FB_VGA16=m
 CONFIG_FB_VESA=y
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
 # CONFIG_FB_IMAC is not set
 # CONFIG_FB_HGA is not set
 # CONFIG_FB_S1D13XXX is not set
@@ -2465,6 +2493,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2754,8 +2786,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2768,10 +2799,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2790,6 +2821,7 @@ CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I82875P=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_I82860=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_R82600=m
@@ -2828,17 +2860,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2853,10 +2897,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2881,7 +2926,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2985,8 +3030,9 @@ 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_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -3099,7 +3145,7 @@ CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_LIST=y
-CONFIG_FRAME_POINTER=y
+# CONFIG_FRAME_POINTER is not set
 # CONFIG_FORCED_INLINING is not set
 CONFIG_BOOT_DELAY=y
 # CONFIG_RCU_TORTURE_TEST is not set
@@ -3130,6 +3176,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3183,7 +3230,7 @@ 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_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
@@ -3218,6 +3265,7 @@ 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
index 8a6643e..24a2b5f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:02:35 2009
+# Thu Nov  5 09:06:18 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -24,6 +24,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -34,7 +35,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -49,7 +50,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -156,6 +156,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -170,7 +172,7 @@ CONFIG_IA64_MCA_RECOVERY=m
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 CONFIG_SGI_SN=y
-# CONFIG_IA64_HP_AML_NFW is not set
+CONFIG_IA64_HP_AML_NFW=y
 
 #
 # SN Devices
@@ -245,6 +247,8 @@ 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_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCI Hotplug Support
@@ -380,7 +384,7 @@ 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_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -411,8 +415,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -566,6 +572,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -654,6 +662,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -722,16 +731,9 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# 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_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_DEBUG=y
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
@@ -835,7 +837,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -940,22 +941,29 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -978,6 +986,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -997,7 +1008,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1011,6 +1022,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1032,7 +1044,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1058,7 +1070,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1068,7 +1080,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1098,7 +1110,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1107,10 +1119,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1214,7 +1226,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_VIA_RHINE_NAPI=y
@@ -1233,6 +1246,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1245,6 +1259,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1262,8 +1277,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1333,15 +1351,19 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL3945_LEDS=y
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1702,7 +1724,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -1766,8 +1789,12 @@ CONFIG_MAX_RAW_DEVS=8192
 # CONFIG_HPET is not set
 CONFIG_HANGCHECK_TIMER=m
 CONFIG_MMTIMER=y
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -1792,7 +1819,7 @@ CONFIG_I2C_ALGOPCA=m
 # 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_PIIX4=m
 CONFIG_I2C_ISA=m
 CONFIG_I2C_NFORCE2=m
 # CONFIG_I2C_OCORES is not set
@@ -2130,6 +2157,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2418,8 +2449,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2432,10 +2462,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2475,17 +2505,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+# CONFIG_INTEL_IOATDMA_V3 is not set
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2500,10 +2542,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2528,7 +2571,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2622,8 +2665,9 @@ 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_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -2785,6 +2829,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -2837,7 +2882,7 @@ 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_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
index 8a6643e..24a2b5f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 12:02:35 2009
+# Thu Nov  5 09:06:18 2009
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -24,6 +24,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -34,7 +35,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -49,7 +50,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -156,6 +156,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -170,7 +172,7 @@ CONFIG_IA64_MCA_RECOVERY=m
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 CONFIG_SGI_SN=y
-# CONFIG_IA64_HP_AML_NFW is not set
+CONFIG_IA64_HP_AML_NFW=y
 
 #
 # SN Devices
@@ -245,6 +247,8 @@ 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_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCI Hotplug Support
@@ -380,7 +384,7 @@ 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_IPV6_OPTIMISTIC_DAD=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
 CONFIG_INET6_IPCOMP=m
@@ -411,8 +415,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -566,6 +572,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -654,6 +662,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -722,16 +731,9 @@ CONFIG_MAC80211_RC_PID=y
 CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUGFS is not set
 # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_HT_DEBUG is not set
-# 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_MAC80211_DEBUG is not set
 CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_DEBUG=y
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
@@ -835,7 +837,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -940,22 +941,29 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_ATA is not set
+CONFIG_SCSI_SAS_ATA=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
 
 #
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -978,6 +986,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -997,7 +1008,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1011,6 +1022,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1032,7 +1044,7 @@ CONFIG_SATA_ULI=m
 CONFIG_SATA_VIA=m
 CONFIG_SATA_VITESSE=m
 CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ACPI=m
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -1058,7 +1070,7 @@ CONFIG_PATA_MARVELL=m
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NINJA32 is not set
 # CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_NS87415=m
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PCMCIA is not set
@@ -1068,7 +1080,7 @@ CONFIG_PATA_NS87415=m
 # CONFIG_PATA_SC1200 is not set
 # CONFIG_PATA_SERVERWORKS is not set
 CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
+CONFIG_PATA_SIL680=m
 CONFIG_PATA_SIS=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
@@ -1098,7 +1110,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_DM_MULTIPATH_RDAC=m
 CONFIG_DM_MULTIPATH_HP=m
 CONFIG_DM_RAID45=m
-# CONFIG_DM_UEVENT is not set
+CONFIG_DM_UEVENT=y
 
 #
 # Fusion MPT device support
@@ -1107,10 +1119,10 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
-# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_LOGGING=y
 
 #
 # Enable only one of the two stacks, unless you know what you are doing
@@ -1214,7 +1226,8 @@ CONFIG_8139TOO_8129=y
 # CONFIG_8139_OLD_RX_RESET is not set
 CONFIG_SIS900=m
 CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
 CONFIG_VIA_RHINE=m
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_VIA_RHINE_NAPI=y
@@ -1233,6 +1246,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1245,6 +1259,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1262,8 +1277,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1333,15 +1351,19 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
-# CONFIG_IWL3945 is not set
+CONFIG_IWL3945=m
+# CONFIG_IWL3945_RFKILL is not set
+CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
+CONFIG_IWL3945_LEDS=y
+# CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
 CONFIG_RT2X00_LIB_PCI=m
@@ -1702,7 +1724,8 @@ CONFIG_PPDEV=m
 # IPMI
 #
 CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_PANIC_EVENT=y
+CONFIG_IPMI_PANIC_STRING=y
 CONFIG_IPMI_DEVICE_INTERFACE=m
 CONFIG_IPMI_SI=m
 CONFIG_IPMI_WATCHDOG=m
@@ -1766,8 +1789,12 @@ CONFIG_MAX_RAW_DEVS=8192
 # CONFIG_HPET is not set
 CONFIG_HANGCHECK_TIMER=m
 CONFIG_MMTIMER=y
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+CONFIG_TELCLOCK=m
 
 #
 # I2C support
@@ -1792,7 +1819,7 @@ CONFIG_I2C_ALGOPCA=m
 # 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_PIIX4=m
 CONFIG_I2C_ISA=m
 CONFIG_I2C_NFORCE2=m
 # CONFIG_I2C_OCORES is not set
@@ -2130,6 +2157,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2418,8 +2449,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2432,10 +2462,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2475,17 +2505,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+# CONFIG_INTEL_IOATDMA_V3 is not set
+CONFIG_UIO=m
 
 #
 # File systems
@@ -2500,10 +2542,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2528,7 +2571,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -2622,8 +2665,9 @@ 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_CIFS_EXPERIMENTAL=y
 CONFIG_CIFS_UPCALL=y
+CONFIG_CIFS_DFS_UPCALL=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -2785,6 +2829,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -2837,7 +2882,7 @@ 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_TEST=m
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_SIGNATURE=y
 CONFIG_CRYPTO_SIGNATURE_DSA=y
index 34e56ed..d8a493c 100644 (file)
@@ -1405,8 +1405,7 @@ CONFIG_S2IO_NAPI=y
 CONFIG_MYRI10GE=m
 CONFIG_NETXEN_NIC=m
 CONFIG_BNX2X=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
+# CONFIG_MLX4_CORE is not set
 
 #
 # Token Ring devices
@@ -2687,34 +2686,7 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-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_EHCA=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_NES=m
-# CONFIG_INFINIBAND_NES_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-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_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
+# CONFIG_INFINIBAND is not set
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
index 34e56ed..d8a493c 100644 (file)
@@ -1405,8 +1405,7 @@ CONFIG_S2IO_NAPI=y
 CONFIG_MYRI10GE=m
 CONFIG_NETXEN_NIC=m
 CONFIG_BNX2X=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
+# CONFIG_MLX4_CORE is not set
 
 #
 # Token Ring devices
@@ -2687,34 +2686,7 @@ CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-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_EHCA=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_NES=m
-# CONFIG_INFINIBAND_NES_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-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_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
+# CONFIG_INFINIBAND is not set
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
index ca780c7..76f4139 100644 (file)
@@ -1,13 +1,14 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Wed Jun  4 07:25:06 2008
+# Thu Nov  5 09:02:58 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
 CONFIG_X86=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_GET_USER_PAGES_FAST=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_MMU=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -41,6 +42,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -52,7 +54,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -67,7 +69,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -137,8 +138,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -169,6 +170,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=255
 CONFIG_HOTPLUG_CPU=y
@@ -224,7 +227,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -287,12 +290,19 @@ CONFIG_PCI_MMCONFIG=y
 CONFIG_VIRTIO=m
 CONFIG_VIRTIO_RING=m
 CONFIG_VIRTIO_PCI=m
+CONFIG_IOMMU_API=y
+CONFIG_DMAR=y
+# CONFIG_DMAR_DEFAULT_ON is not set
+CONFIG_DMAR_GFX_WA=y
+CONFIG_DMAR_FLOPPY_WA=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=m
 # CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -468,8 +478,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -623,6 +635,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -711,6 +725,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -985,7 +1000,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1094,7 +1108,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1104,12 +1120,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1132,6 +1153,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
 CONFIG_FCOE_FNIC=m
@@ -1155,7 +1179,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1169,6 +1193,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1265,8 +1290,7 @@ CONFIG_FUSION=y
 CONFIG_FUSION_SPI=m
 CONFIG_FUSION_FC=m
 CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=256
-CONFIG_FUSION_MAX_FC_SGE=256
+CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
 CONFIG_FUSION_LOGGING=y
@@ -1403,6 +1427,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1415,6 +1440,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1432,8 +1458,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1517,18 +1546,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2367,6 +2396,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2657,8 +2690,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2671,10 +2703,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2690,6 +2722,7 @@ CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_POLL=y
 
@@ -2726,17 +2759,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # Firmware Drivers
@@ -2744,7 +2789,8 @@ CONFIG_INTEL_IOATDMA=m
 CONFIG_EDD=m
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 
 #
 # File systems
@@ -2759,10 +2805,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2771,7 +2818,11 @@ 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_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_NOLOCK=m
 CONFIG_GFS2_FS_LOCKING_DLM=m
@@ -2787,7 +2838,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3004,7 +3055,7 @@ CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_LIST=y
-CONFIG_FRAME_POINTER=y
+# CONFIG_FRAME_POINTER is not set
 # CONFIG_FORCED_INLINING is not set
 CONFIG_BOOT_DELAY=y
 # CONFIG_RCU_TORTURE_TEST is not set
@@ -3027,6 +3078,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3112,6 +3164,7 @@ 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
index 29f28a5..76f4139 100644 (file)
@@ -1,13 +1,14 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.18-prep
-# Thu Jan 22 11:53:40 2009
+# Thu Nov  5 09:02:58 2009
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
 CONFIG_X86=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_GET_USER_PAGES_FAST=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_MMU=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -41,6 +42,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 # CONFIG_IKCONFIG is not set
@@ -52,7 +54,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_UID16=y
 CONFIG_SYSCTL=y
 CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
+# CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -67,7 +69,6 @@ CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_MARKERS=y
-CONFIG_TRACEPROBES=m
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -137,8 +138,8 @@ 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_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_NOTIFIERS=y
@@ -169,6 +170,8 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MMU_NOTIFIER_TABSZ=512
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=255
 CONFIG_HOTPLUG_CPU=y
@@ -224,7 +227,7 @@ CONFIG_ACPI_VIDEO=m
 # CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
+# CONFIG_ACPI_BAY is not set
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_THERMAL=y
@@ -287,12 +290,19 @@ CONFIG_PCI_MMCONFIG=y
 CONFIG_VIRTIO=m
 CONFIG_VIRTIO_RING=m
 CONFIG_VIRTIO_PCI=m
+CONFIG_IOMMU_API=y
+CONFIG_DMAR=y
+# CONFIG_DMAR_DEFAULT_ON is not set
+CONFIG_DMAR_GFX_WA=y
+CONFIG_DMAR_FLOPPY_WA=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=m
 # CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
+CONFIG_PCI_STUB=y
+CONFIG_PCI_IOV=y
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -468,8 +478,10 @@ 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_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -623,6 +635,8 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+CONFIG_RDS=m
+# CONFIG_RDS_DEBUG is not set
 
 #
 # TIPC Configuration (EXPERIMENTAL)
@@ -711,6 +725,7 @@ CONFIG_NET_ESTIMATOR=y
 #
 CONFIG_NET_PKTGEN=m
 # CONFIG_NET_TCPPROBE is not set
+CONFIG_NET_DROP_MONITOR=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 CONFIG_BT=m
@@ -985,7 +1000,6 @@ CONFIG_BLK_DEV_SX8=m
 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
@@ -1094,7 +1108,9 @@ CONFIG_SCSI_LOGGING=y
 #
 CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_ISCSI1_ATTRS=m
+CONFIG_SCSI_ISCSI2_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
 CONFIG_SCSI_SAS_LIBSAS=m
 CONFIG_SCSI_SAS_ATA=y
@@ -1104,12 +1120,17 @@ CONFIG_SCSI_SAS_ATA=y
 # SCSI low-level drivers
 #
 CONFIG_LIBFC=m
+CONFIG_LIBFCOE=m
 CONFIG_FCOE=m
-# CONFIG_ISCSI_TCP is not set
+CONFIG_LIBISCSI1=m
+CONFIG_ISCSI_TCP=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
 CONFIG_BLK_DEV_3W_XXXX_RAID=m
 CONFIG_SCSI_3W_9XXX=m
 CONFIG_SCSI_ACARD=m
 CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_MVSAS=m
 CONFIG_SCSI_AIC7XXX=m
 CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
@@ -1132,6 +1153,9 @@ CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
 CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_MPT2SAS=m
+CONFIG_SCSI_MPT2SAS_MAX_SGE=128
+CONFIG_SCSI_MPT2SAS_LOGGING=y
 CONFIG_SCSI_HPTIOP=m
 # CONFIG_SCSI_BUSLOGIC is not set
 CONFIG_FCOE_FNIC=m
@@ -1155,7 +1179,7 @@ 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 is not set
+CONFIG_SCSI_QLA_ISCSI=m
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 # CONFIG_SCSI_DC390T is not set
@@ -1169,6 +1193,7 @@ CONFIG_SCSI_DC395x=m
 # CONFIG_PCMCIA_SYM53C500 is not set
 CONFIG_SCSI_DH=m
 CONFIG_SCSI_DH_RDAC=m
+CONFIG_SCSI_DH_ALUA=m
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -1402,6 +1427,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_E1000E=m
 CONFIG_IGB=m
+CONFIG_IGBVF=m
 CONFIG_NS83820=m
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1414,6 +1440,7 @@ CONFIG_SKY2=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
 CONFIG_BNX2=m
+CONFIG_CNIC=m
 CONFIG_QLA3XXX=m
 
 #
@@ -1431,8 +1458,11 @@ CONFIG_ENIC=m
 CONFIG_NETXEN_NIC=m
 CONFIG_NIU=m
 CONFIG_BNX2X=m
+CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
 CONFIG_MLX4_CORE=m
 CONFIG_MLX4_DEBUG=y
+CONFIG_BE2NET=m
 
 #
 # Token Ring devices
@@ -1516,18 +1546,18 @@ CONFIG_ATH5K=m
 # CONFIG_ATH5K_DEBUG is not set
 CONFIG_IWLWIFI=m
 CONFIG_IWLCORE=m
-# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_IWLWIFI_LEDS=y
 # CONFIG_IWLWIFI_RFKILL is not set
 # CONFIG_IWLWIFI_DEBUG is not set
 CONFIG_IWLAGN=m
 CONFIG_IWLAGN_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWLAGN_LEDS is not set
+CONFIG_IWLAGN_LEDS=y
 CONFIG_IWL4965=y
 CONFIG_IWL5000=y
 CONFIG_IWL3945=m
 # CONFIG_IWL3945_RFKILL is not set
 CONFIG_IWL3945_SPECTRUM_MEASUREMENT=y
-# CONFIG_IWL3945_LEDS is not set
+CONFIG_IWL3945_LEDS=y
 # CONFIG_IWL3945_DEBUG is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB=m
@@ -2366,6 +2396,10 @@ CONFIG_SND_FM801_TEA575X_BOOL=y
 CONFIG_SND_FM801_TEA575X=m
 CONFIG_SND_HDA_POWER_SAVE=y
 CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_RECONFIG is not set
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_GENERIC=y
 CONFIG_SND_HDA_INTEL=m
 CONFIG_SND_HDSP=m
 CONFIG_SND_HDSPM=m
@@ -2656,8 +2690,7 @@ 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_AMSO1100 is not set
 CONFIG_INFINIBAND_CXGB3=m
 # CONFIG_INFINIBAND_CXGB3_DEBUG is not set
 CONFIG_INFINIBAND_NES=m
@@ -2670,10 +2703,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
+CONFIG_INFINIBAND_SDP_DEBUG=y
+CONFIG_INFINIBAND_SDP_DEBUG_DATA=y
 CONFIG_INFINIBAND_QLGC_VNIC=m
-# CONFIG_INFINIBAND_QLGC_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_QLGC_VNIC_STATS=y
+# CONFIG_INFINIBAND_QLGC_VNIC_STATS is not set
 CONFIG_INFINIBAND_MADEYE=m
 
 #
@@ -2689,6 +2722,7 @@ CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_E752X=m
 CONFIG_EDAC_I3000=m
 CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
 CONFIG_EDAC_K8=m
 CONFIG_EDAC_POLL=y
 
@@ -2725,17 +2759,29 @@ CONFIG_RTC_DRV_V3020=m
 #
 # DMA Engine support
 #
-CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE=m
 
 #
-# DMA Clients
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+CONFIG_DCA=m
+
+#
+# DMA Engine support version 3
+#
+CONFIG_DMA_ENGINE_V3=y
+
+#
+# DMA Clients V3
 #
 CONFIG_NET_DMA=y
 
 #
 # DMA Devices
 #
-CONFIG_INTEL_IOATDMA=m
+CONFIG_INTEL_IOATDMA_V3=m
+CONFIG_UIO=m
 
 #
 # Firmware Drivers
@@ -2743,7 +2789,8 @@ CONFIG_INTEL_IOATDMA=m
 CONFIG_EDD=m
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
-# CONFIG_ISCSI_IBFT_FIND is not set
+CONFIG_ISCSI_IBFT_FIND=y
+CONFIG_ISCSI_IBFT=m
 
 #
 # File systems
@@ -2758,10 +2805,11 @@ 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_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
 CONFIG_JBD2=m
@@ -2770,7 +2818,11 @@ 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_XFS_FS=m
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_DEBUG is not set
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_NOLOCK=m
 CONFIG_GFS2_FS_LOCKING_DLM=m
@@ -2786,7 +2838,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
 
 #
 # Caches
@@ -3003,7 +3055,7 @@ CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_LIST=y
-CONFIG_FRAME_POINTER=y
+# CONFIG_FRAME_POINTER is not set
 # CONFIG_FORCED_INLINING is not set
 CONFIG_BOOT_DELAY=y
 # CONFIG_RCU_TORTURE_TEST is not set
@@ -3026,6 +3078,7 @@ CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
+CONFIG_LSM_MMAP_MIN_ADDR=65536
 CONFIG_SECURITY_SELINUX=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM=y
 CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
@@ -3111,6 +3164,7 @@ 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
index a01aaaf..2a69694 100644 (file)
@@ -16,12 +16,8 @@ Index: linux-2.6/kernel/sched.c
  {
        struct task_struct *relative;
        unsigned long free = 0;
-@@ -4698,9 +4698,10 @@ static void show_task(struct task_struct
-       else
-               printk(" (NOTLB)\n");
+@@ -4698,6 +4698,7 @@ static void show_task(struct task_struct
  
--      if (state != TASK_RUNNING)
-+      if (state != TASK_RUNNING || p == current)
                show_stack(p, NULL);
  }
 +EXPORT_SYMBOL(show_task);
index 49ed3de..5f26c0b 100644 (file)
@@ -223,7 +223,7 @@ Index: linux-2.6.18-128.1.6/fs/jbd/commit.c
 -              } else {
 -                      jbd_unlock_bh_state(bh);
 -              }
--              put_bh(bh);
+-              release_data_buffer(bh);
 -              cond_resched_lock(&journal->j_list_lock);
 -      }
 +      if (!JFS_HAS_INCOMPAT_FEATURE(journal,
index 476e06f..2933591 100644 (file)
@@ -74,9 +74,9 @@ Index: linux-2.6.18-128.1.6/include/linux/jbd2.h
 +       * Called when the transaction is committed. [t_jcb_lock]
 +       */
 +      struct list_head        t_jcb;
- };
- struct transaction_run_stats_s {
+       /*
+        * For use by the filesystem to store fs-specific data
+        * structures associated with the transaction
 @@ -1018,6 +1058,9 @@
  extern int     jbd2_journal_flush (journal_t *);
  extern void    jbd2_journal_lock_updates (journal_t *);
@@ -139,9 +139,9 @@ Index: linux-2.6.18-128.1.6/fs/jbd2/journal.c
 --- linux-2.6.18-128.1.6.orig/fs/jbd2/journal.c        2009-04-15 08:35:28.000000000 +0530
 +++ linux-2.6.18-128.1.6/fs/jbd2/journal.c     2009-05-28 17:13:35.000000000 +0530
 @@ -80,6 +80,9 @@
- EXPORT_SYMBOL(jbd2_journal_invalidatepage);
- EXPORT_SYMBOL(jbd2_journal_try_to_free_buffers);
- EXPORT_SYMBOL(jbd2_journal_force_commit);
+ EXPORT_SYMBOL(jbd2_journal_init_jbd_inode);
+ EXPORT_SYMBOL(jbd2_journal_release_jbd_inode);
+ EXPORT_SYMBOL(jbd2_journal_begin_ordered_truncate);
 +EXPORT_SYMBOL(jbd2_journal_callback_set);
 +EXPORT_SYMBOL(jbd2_journal_bmap);
 +EXPORT_SYMBOL(jbd2_log_start_commit);
@@ -153,9 +153,9 @@ Index: linux-2.6.18-128.1.6/fs/jbd2/transaction.c
 --- linux-2.6.18-128.1.6.orig/fs/jbd2/transaction.c    2009-04-15 08:35:28.000000000 +0530
 +++ linux-2.6.18-128.1.6/fs/jbd2/transaction.c 2009-05-28 15:11:28.000000000 +0530
 @@ -51,6 +51,9 @@
-       transaction->t_tid = journal->j_transaction_sequence++;
-       transaction->t_expires = jiffies + journal->j_commit_interval;
        spin_lock_init(&transaction->t_handle_lock);
+       INIT_LIST_HEAD(&transaction->t_inode_list);
+       INIT_LIST_HEAD(&transaction->t_private_list);
 +      INIT_LIST_HEAD(&transaction->t_jcb);
 +      spin_lock_init(&transaction->t_jcb_lock);
 +
index 51b48cb..06db94d 100644 (file)
@@ -428,9 +428,9 @@ Index: linux-2.6.18-128.1.6/mm/filemap.c
  #include <linux/syscalls.h>
  #include <linux/cpuset.h>
 +#include <linux/rmap.h>
- #include "filemap.h"
+ #include <linux/hardirq.h> /* for BUG_ON(!in_atomic()) only */
+ #include <trace/mm.h>
  #include "internal.h"
 @@ -567,11 +568,55 @@
                if (!test_clear_page_writeback(page))
                        BUG();
index f563eb5..a74e9b0 100644 (file)
@@ -1,12 +1,14 @@
 lnxmaj="2.6.18"
-lnxrel="128.7.1.0.1.el5"
+lnxrel="164.6.1.0.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
 EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.1
+OFED_VERSION=inkernel
+RDAC_VERSION="09.03.0C02.0013"
+MPTLINUX_VERSION="4.16.00.00-2"
 
 BASE_ARCHS="i686 x86_64 ia64"
 BIGMEM_ARCHS=""
index a21e014..260eb4a 100644 (file)
@@ -1,12 +1,13 @@
 lnxmaj="2.6.18"
-lnxrel="128.7.1.el5"
+lnxrel="164.6.1.el5"
 
 KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
 SERIES=2.6-rhel5.series
 EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
 LUSTRE_VERSION=@VERSION@
 
-OFED_VERSION=1.4.2
+RDAC_VERSION="09.03.0C02.0013"
+MPTLINUX_VERSION="4.16.00.00-2"
 
 BASE_ARCHS="i686 x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
index 4de5551..f73cc18 100644 (file)
@@ -20,6 +20,8 @@ EXTRA_VERSION="${lnxrel}_lustre.@VERSION@"
 LUSTRE_VERSION=@VERSION@
 
 OFED_VERSION=1.4.2
+RDAC_VERSION="09.03.0C02.0013"
+MPTLINUX_VERSION="4.16.00.00-2"
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
index 067d0e6..696115b 100644 (file)
@@ -1,11 +1,9 @@
 SERIES                VERSION                  COMMENT
 
 SUPPORTED KERNELS:
-2.6-rhel4             RHEL4: 2.6.9-67.0.20.EL
 2.6-sles10            SLES10: 2.6.16.60-0.39.3
-2.6-rhel5             RHEL5: 2.6.18-128.7.1.el5
-2.6-rhel5             OEL5: 2.6.18-128.7.1.el5
-2.6.18-vanilla        kernel.org: 2.6.18.8
+2.6-rhel5             RHEL5: 2.6.18-164.6.1.el5
+2.6-rhel5             OEL5: 2.6.18-164.6.1.0.1.el5
 2.6.22-vanilla        kernel.org: 2.6.22.14
 2.6-sles11            SLES11: 2.6.27.23-0.1
 
index ed81f15..1527635 100644 (file)
@@ -118,6 +118,7 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io,
                         *descr = whole_file;
                         descr->cld_obj   = clob;
                         descr->cld_mode  = CLM_PHANTOM;
+                        descr->cld_enq_flags = CEF_ASYNC | CEF_MUST;
                         cio->cui_glimpse = 1;
                         /*
                          * CEF_ASYNC is used because glimpse sub-locks cannot
@@ -127,9 +128,8 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io,
                          * CEF_MUST protects glimpse lock from conversion into
                          * a lockless mode.
                          */
-                        lock = cl_lock_request(env, io, descr,
-                                               CEF_ASYNC|CEF_MUST,
-                                               "glimpse", cfs_current());
+                        lock = cl_lock_request(env, io, descr, "glimpse",
+                                               cfs_current());
                         cio->cui_glimpse = 0;
                         if (!IS_ERR(lock)) {
                                 result = cl_wait(env, lock);
index 30e2488..3d8ea67 100644 (file)
@@ -629,9 +629,6 @@ int ccc_lock_fits_into(const struct lu_env *env,
         /*
          * Also, don't match incomplete write locks for read, otherwise read
          * would enqueue missing sub-locks in the write mode.
-         *
-         * XXX this is a candidate for generic locking policy, to be moved
-         * into cl_lock_lookup().
          */
         else if (need->cld_mode != descr->cld_mode)
                 result = lock->cll_state >= CLS_ENQUEUED;
@@ -693,8 +690,9 @@ void ccc_lock_state(const struct lu_env *env,
                         cl_inode_mtime(inode) = attr->cat_mtime;
                         cl_inode_atime(inode) = attr->cat_atime;
                         cl_inode_ctime(inode) = attr->cat_ctime;
-                } else
-                        CL_LOCK_DEBUG(D_ERROR, env, lock, "attr_get: %i\n", rc);
+                } else {
+                        CL_LOCK_DEBUG(D_INFO, env, lock, "attr_get: %i\n", rc);
+                }
                 cl_object_attr_unlock(obj);
                 cl_isize_unlock(inode, 0);
         }
@@ -728,12 +726,18 @@ int ccc_io_one_lock_index(const struct lu_env *env, struct cl_io *io,
         CDEBUG(D_VFSTRACE, "lock: %i [%lu, %lu]\n", mode, start, end);
 
         memset(&cio->cui_link, 0, sizeof cio->cui_link);
-        descr->cld_mode  = mode;
+
+        if (cio->cui_fd && (cio->cui_fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
+                descr->cld_mode = CLM_GROUP;
+                descr->cld_gid  = cio->cui_fd->fd_grouplock.cg_gid;
+        } else {
+                descr->cld_mode  = mode;
+        }
         descr->cld_obj   = obj;
         descr->cld_start = start;
         descr->cld_end   = end;
+        descr->cld_enq_flags = enqflags;
 
-        cio->cui_link.cill_enq_flags = enqflags;
         cl_io_lock_add(env, io, &cio->cui_link);
         RETURN(0);
 }
index 24e896d..ee4fef3 100644 (file)
@@ -154,8 +154,9 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
         descr->cld_mode = CLM_GROUP;
 
         enqflags = CEF_MUST | (nonblock ? CEF_NONBLOCK : 0);
-        lock = cl_lock_request(env, io, descr, enqflags,
-                               GROUPLOCK_SCOPE, cfs_current());
+        descr->cld_enq_flags = enqflags;
+
+        lock = cl_lock_request(env, io, descr, GROUPLOCK_SCOPE, cfs_current());
         if (IS_ERR(lock)) {
                 cl_io_fini(env, io);
                 cl_env_put(env, &refcheck);
index b3b2cb1..a983b89 100644 (file)
@@ -400,12 +400,12 @@ reprocess:
                         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_lock_get(lock->l_export);
+                        new2->l_export = class_export_lock_get(lock->l_export, new2);
                         if (new2->l_export->exp_lock_hash &&
                             hlist_unhashed(&new2->l_exp_hash))
-                                lustre_hash_add(new2->l_export->exp_lock_hash,
-                                                &new2->l_remote_handle,
-                                                &new2->l_exp_hash);
+                                cfs_hash_add(new2->l_export->exp_lock_hash,
+                                             &new2->l_remote_handle,
+                                             &new2->l_exp_hash);
                 }
                 if (*flags == LDLM_FL_WAIT_NOREPROC)
                         ldlm_lock_addref_internal_nolock(new2,
index ec88bed..2de9fea 100644 (file)
@@ -772,7 +772,7 @@ int target_handle_connect(struct ptlrpc_request *req)
         if (obd_uuid_equals(&cluuid, &target->obd_uuid))
                 goto dont_check_exports;
 
-        export = lustre_hash_lookup(target->obd_uuid_hash, &cluuid);
+        export = cfs_hash_lookup(target->obd_uuid_hash, &cluuid);
         if (!export)
                 goto no_export;
 
@@ -957,6 +957,7 @@ dont_check_exports:
 
                 GOTO(out, rc = -EALREADY);
         }
+        LASSERT(lustre_msg_get_conn_cnt(req->rq_reqmsg) > 0);
         export->exp_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg);
         export->exp_abort_active_req = 0;
 
@@ -976,9 +977,9 @@ dont_check_exports:
                 /* Check to see if connection came from another NID */
                 if ((export->exp_connection->c_peer.nid != req->rq_peer.nid) &&
                     !hlist_unhashed(&export->exp_nid_hash))
-                        lustre_hash_del(export->exp_obd->obd_nid_hash,
-                                        &export->exp_connection->c_peer.nid,
-                                        &export->exp_nid_hash);
+                        cfs_hash_del(export->exp_obd->obd_nid_hash,
+                                     &export->exp_connection->c_peer.nid,
+                                     &export->exp_nid_hash);
 
                 ptlrpc_connection_put(export->exp_connection);
         }
@@ -987,9 +988,9 @@ dont_check_exports:
                                                        req->rq_self,
                                                        &remote_uuid);
         if (hlist_unhashed(&export->exp_nid_hash)) {
-                lustre_hash_add_unique(export->exp_obd->obd_nid_hash,
-                                       &export->exp_connection->c_peer.nid,
-                                       &export->exp_nid_hash);
+                cfs_hash_add_unique(export->exp_obd->obd_nid_hash,
+                                    &export->exp_connection->c_peer.nid,
+                                    &export->exp_nid_hash);
         }
 
         spin_lock_bh(&target->obd_processing_task_lock);
@@ -1684,20 +1685,8 @@ static int handle_recovery_req(struct ptlrpc_thread *thread,
                                       AT_OFF ? obd_timeout :
                                       lustre_msg_get_timeout(req->rq_reqmsg), 1);
         }
-        /**
-         * bz18031: increase next_recovery_transno before target_request_copy_put()
-         * will drop exp_rpc reference
-         */
-        if (req->rq_export->exp_req_replay_needed) {
-                spin_lock_bh(&req->rq_export->exp_obd->obd_processing_task_lock);
-                req->rq_export->exp_obd->obd_next_recovery_transno++;
-                spin_unlock_bh(&req->rq_export->exp_obd->obd_processing_task_lock);
-        }
 reqcopy_put:
-        if (req->rq_export->exp_req_replay_needed)
-                target_exp_dequeue_req_replay(req);
-        target_request_copy_put(req);
-        RETURN(0);
+        RETURN(rc);
 }
 
 static int target_recovery_thread(void *arg)
@@ -1754,6 +1743,15 @@ static int target_recovery_thread(void *arg)
                           libcfs_nid2str(req->rq_peer.nid));
                 handle_recovery_req(thread, req,
                                     trd->trd_recovery_handler);
+                /**
+                 * bz18031: increase next_recovery_transno before
+                 * target_request_copy_put() will drop exp_rpc reference
+                 */
+                spin_lock_bh(&obd->obd_processing_task_lock);
+                obd->obd_next_recovery_transno++;
+                spin_unlock_bh(&obd->obd_processing_task_lock);
+                target_exp_dequeue_req_replay(req);
+                target_request_copy_put(req);
                 obd->obd_replayed_requests++;
         }
 
@@ -1768,6 +1766,7 @@ static int target_recovery_thread(void *arg)
                           libcfs_nid2str(req->rq_peer.nid));
                 handle_recovery_req(thread, req,
                                     trd->trd_recovery_handler);
+                target_request_copy_put(req);
                 obd->obd_replayed_locks++;
         }
 
@@ -1790,6 +1789,7 @@ static int target_recovery_thread(void *arg)
                           libcfs_nid2str(req->rq_peer.nid));
                 handle_recovery_req(thread, req,
                                     trd->trd_recovery_handler);
+                target_request_copy_put(req);
         }
 
         delta = (jiffies - delta) / HZ;
@@ -2253,7 +2253,7 @@ 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 obd_device *master_obd = NULL, *lov_obd = NULL;
         struct obd_device_target *obt;
         struct lustre_quota_ctxt *qctxt;
         struct qunit_data *qdata = NULL;
@@ -2280,13 +2280,13 @@ int target_handle_dqacq_callback(struct ptlrpc_request *req)
         }
 
         /* we use the observer */
-        if (!obd->obd_observer || !obd->obd_observer->obd_observer) {
+        if (obd_pin_observer(obd, &lov_obd) ||
+            obd_pin_observer(lov_obd, &master_obd)) {
                 CERROR("Can't find the observer, it is recovering\n");
                 req->rq_status = -EAGAIN;
                 GOTO(out, rc);
         }
 
-        master_obd = obd->obd_observer->obd_observer;
         obt = &master_obd->u.obt;
         qctxt = &obt->obt_qctxt;
 
@@ -2332,6 +2332,11 @@ int target_handle_dqacq_callback(struct ptlrpc_request *req)
         EXIT;
 
 out:
+        if (master_obd)
+                obd_unpin_observer(lov_obd);
+        if (lov_obd)
+                obd_unpin_observer(obd);
+
         rc = ptlrpc_reply(req);
         return rc;
 #else
@@ -2476,3 +2481,18 @@ ldlm_error_t ldlm_errno2error(int err_no)
 }
 EXPORT_SYMBOL(ldlm_errno2error);
 
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+void ldlm_dump_export_locks(struct obd_export *exp)
+{
+        spin_lock(&exp->exp_locks_list_guard);
+        if (!list_empty(&exp->exp_locks_list)) {
+            struct ldlm_lock *lock;
+
+            CERROR("dumping locks for export %p,"
+                   "ignore if the unmount doesn't hang\n", exp);
+            list_for_each_entry(lock, &exp->exp_locks_list, l_exp_refs_link)
+                ldlm_lock_dump(D_ERROR, lock, 0);
+        }
+        spin_unlock(&exp->exp_locks_list_guard);
+}
+#endif
index 5d719d4..096bf9b 100644 (file)
@@ -164,7 +164,7 @@ void ldlm_lock_put(struct ldlm_lock *lock)
                 ldlm_resource_putref(res);
                 lock->l_resource = NULL;
                 if (lock->l_export) {
-                        class_export_lock_put(lock->l_export);
+                        class_export_lock_put(lock->l_export, lock);
                         lock->l_export = NULL;
                 }
 
@@ -270,8 +270,8 @@ int ldlm_lock_destroy_internal(struct ldlm_lock *lock)
 
         if (lock->l_export && lock->l_export->exp_lock_hash &&
             !hlist_unhashed(&lock->l_exp_hash))
-                lustre_hash_del(lock->l_export->exp_lock_hash,
-                                &lock->l_remote_handle, &lock->l_exp_hash);
+                cfs_hash_del(lock->l_export->exp_lock_hash,
+                             &lock->l_remote_handle, &lock->l_exp_hash);
 
         ldlm_lock_remove_from_lru(lock);
         class_handle_unhash(&lock->l_handle);
@@ -371,6 +371,12 @@ static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource)
         lu_ref_add(&lock->l_reference, "hash", lock);
         lock->l_callback_timeout = 0;
 
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        CFS_INIT_LIST_HEAD(&lock->l_exp_refs_link);
+        lock->l_exp_refs_nr = 0;
+        lock->l_exp_refs_target = NULL;
+#endif
+
         RETURN(lock);
 }
 
@@ -1461,6 +1467,9 @@ int ldlm_run_ast_work(struct list_head *rpc_list, ldlm_desc_ast_t ast_type)
         int ast_count;
         ENTRY;
 
+        if (list_empty(rpc_list))
+                RETURN(0);
+
         arg.set = ptlrpc_prep_set();
         if (NULL == arg.set)
                 RETURN(-ERESTART);
@@ -1667,7 +1676,7 @@ void ldlm_cancel_locks_for_export_cb(void *obj, void *data)
         LDLM_LOCK_GET(lock);
 
         LDLM_DEBUG(lock, "export %p", exp);
-        ldlm_res_lvbo_update(res, NULL, 0, 1);
+        ldlm_res_lvbo_update(res, NULL, 1);
         ldlm_lock_cancel(lock);
         ldlm_reprocess_all(res);
         ldlm_resource_putref(res);
@@ -1676,8 +1685,8 @@ void ldlm_cancel_locks_for_export_cb(void *obj, void *data)
 
 void ldlm_cancel_locks_for_export(struct obd_export *exp)
 {
-        lustre_hash_for_each_empty(exp->exp_lock_hash,
-                                   ldlm_cancel_locks_for_export_cb, exp);
+        cfs_hash_for_each_empty(exp->exp_lock_hash,
+                                ldlm_cancel_locks_for_export_cb, exp);
 }
 
 /**
index 9f3dc50..51e5fee 100644 (file)
@@ -208,7 +208,7 @@ static int expired_lock_main(void *arg)
                                 LDLM_LOCK_RELEASE(lock);
                                 continue;
                         }
-                        export = class_export_lock_get(lock->l_export);
+                        export = class_export_lock_get(lock->l_export, lock);
                         spin_unlock_bh(&waiting_locks_spinlock);
 
                         /* release extra ref grabbed by ldlm_add_waiting_lock()
@@ -217,7 +217,7 @@ static int expired_lock_main(void *arg)
 
                         do_dump++;
                         class_fail_export(export);
-                        class_export_lock_put(export);
+                        class_export_lock_put(export, lock);
                         spin_lock_bh(&waiting_locks_spinlock);
                 }
                 spin_unlock_bh(&waiting_locks_spinlock);
@@ -637,8 +637,7 @@ static int ldlm_cb_interpret(const struct lu_env *env,
                  * been received 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);
+                        ldlm_res_lvbo_update(lock->l_resource, NULL, 1);
                 rc = ldlm_handle_ast_error(lock, req, rc,
                                            arg->type == LDLM_BL_CALLBACK
                                            ? "blocking" : "completion");
@@ -949,7 +948,7 @@ int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data)
         else if (rc != 0)
                 rc = ldlm_handle_ast_error(lock, req, rc, "glimpse");
         else
-                rc = ldlm_res_lvbo_update(res, req, REPLY_REC_OFF, 1);
+                rc = ldlm_res_lvbo_update(res, req, 1);
 
         ptlrpc_req_finished(req);
         if (rc == -ERESTART)
@@ -1080,8 +1079,8 @@ int ldlm_handle_enqueue0(struct ldlm_namespace *ns,
 
         if (unlikely(flags & LDLM_FL_REPLAY)) {
                 /* Find an existing lock in the per-export lock hash */
-                lock = lustre_hash_lookup(req->rq_export->exp_lock_hash,
-                                          (void *)&dlm_req->lock_handle[0]);
+                lock = cfs_hash_lookup(req->rq_export->exp_lock_hash,
+                                       (void *)&dlm_req->lock_handle[0]);
                 if (lock != NULL) {
                         DEBUG_REQ(D_DLMTRACE, req, "found existing lock cookie "
                                   LPX64, lock->l_handle.h_cookie);
@@ -1109,11 +1108,12 @@ int ldlm_handle_enqueue0(struct ldlm_namespace *ns,
                 LDLM_ERROR(lock, "lock on destroyed export %p", req->rq_export);
                 GOTO(out, rc = -ENOTCONN);
         }
-        lock->l_export = class_export_lock_get(req->rq_export);
+
+        lock->l_export = class_export_lock_get(req->rq_export, lock);
         if (lock->l_export->exp_lock_hash)
-                lustre_hash_add(lock->l_export->exp_lock_hash,
-                                &lock->l_remote_handle,
-                                &lock->l_exp_hash);
+                cfs_hash_add(lock->l_export->exp_lock_hash,
+                             &lock->l_remote_handle,
+                             &lock->l_exp_hash);
 
 existing_lock:
 
@@ -1390,7 +1390,7 @@ int ldlm_request_cancel(struct ptlrpc_request *req,
                         if (res != NULL) {
                                 ldlm_resource_getref(res);
                                 LDLM_RESOURCE_ADDREF(res);
-                                ldlm_res_lvbo_update(res, NULL, 0, 1);
+                                ldlm_res_lvbo_update(res, NULL, 1);
                         }
                         pres = res;
                 }
@@ -1543,9 +1543,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
                         LDLM_ERROR(lock, "completion AST did not contain "
                                    "expected LVB!");
                 } else {
-                        void *lvb = req_capsule_client_swab_get(&req->rq_pill,
-                                                                &RMF_DLM_LVB,
-                                                  (void *)lock->l_lvb_swabber);
+                        void *lvb = req_capsule_client_get(&req->rq_pill,
+                                                           &RMF_DLM_LVB);
                         memcpy(lock->l_lvb_data, lvb, lock->l_lvb_len);
                 }
         }
@@ -2010,8 +2009,8 @@ void ldlm_revoke_lock_cb(void *obj, void *data)
         lock->l_flags |= LDLM_FL_AST_SENT;
         if (lock->l_export && lock->l_export->exp_lock_hash &&
             !hlist_unhashed(&lock->l_exp_hash))
-                lustre_hash_del(lock->l_export->exp_lock_hash,
-                                &lock->l_remote_handle, &lock->l_exp_hash);
+                cfs_hash_del(lock->l_export->exp_lock_hash,
+                             &lock->l_remote_handle, &lock->l_exp_hash);
         list_add_tail(&lock->l_rk_ast, rpc_list);
         LDLM_LOCK_GET(lock);
 
@@ -2024,8 +2023,8 @@ void ldlm_revoke_export_locks(struct obd_export *exp)
         ENTRY;
 
         CFS_INIT_LIST_HEAD(&rpc_list);
-        lustre_hash_for_each_empty(exp->exp_lock_hash,
-                                   ldlm_revoke_lock_cb, &rpc_list);
+        cfs_hash_for_each_empty(exp->exp_lock_hash,
+                                ldlm_revoke_lock_cb, &rpc_list);
         ldlm_run_ast_work(&rpc_list, LDLM_WORK_REVOKE_AST);
 
         EXIT;
@@ -2198,9 +2197,9 @@ void ldlm_put_ref(void)
  * Export handle<->lock hash operations.
  */
 static unsigned
-ldlm_export_lock_hash(lustre_hash_t *lh, void *key, unsigned mask)
+ldlm_export_lock_hash(cfs_hash_t *hs, void *key, unsigned mask)
 {
-        return lh_u64_hash(((struct lustre_handle *)key)->cookie, mask);
+        return cfs_hash_u64_hash(((struct lustre_handle *)key)->cookie, mask);
 }
 
 static void *
@@ -2244,12 +2243,12 @@ ldlm_export_lock_put(struct hlist_node *hnode)
         RETURN(lock);
 }
 
-static lustre_hash_ops_t ldlm_export_lock_ops = {
-        .lh_hash    = ldlm_export_lock_hash,
-        .lh_key     = ldlm_export_lock_key,
-        .lh_compare = ldlm_export_lock_compare,
-        .lh_get     = ldlm_export_lock_get,
-        .lh_put     = ldlm_export_lock_put
+static cfs_hash_ops_t ldlm_export_lock_ops = {
+        .hs_hash    = ldlm_export_lock_hash,
+        .hs_key     = ldlm_export_lock_key,
+        .hs_compare = ldlm_export_lock_compare,
+        .hs_get     = ldlm_export_lock_get,
+        .hs_put     = ldlm_export_lock_put
 };
 
 int ldlm_init_export(struct obd_export *exp)
@@ -2257,8 +2256,9 @@ int ldlm_init_export(struct obd_export *exp)
         ENTRY;
 
         exp->exp_lock_hash =
-                lustre_hash_init(obd_uuid2str(&exp->exp_client_uuid),
-                                 7, 16, &ldlm_export_lock_ops, LH_REHASH);
+                cfs_hash_create(obd_uuid2str(&exp->exp_client_uuid),
+                                HASH_EXP_LOCK_CUR_BITS, HASH_EXP_LOCK_MAX_BITS,
+                                &ldlm_export_lock_ops, CFS_HASH_REHASH);
 
         if (!exp->exp_lock_hash)
                 RETURN(-ENOMEM);
@@ -2270,7 +2270,7 @@ EXPORT_SYMBOL(ldlm_init_export);
 void ldlm_destroy_export(struct obd_export *exp)
 {
         ENTRY;
-        lustre_hash_exit(exp->exp_lock_hash);
+        cfs_hash_destroy(exp->exp_lock_hash);
         exp->exp_lock_hash = NULL;
         EXIT;
 }
@@ -2492,7 +2492,9 @@ int __init ldlm_init(void)
                 cfs_mem_cache_destroy(ldlm_lock_slab);
                 return -ENOMEM;
         }
-
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        class_export_dump_hook = ldlm_dump_export_locks;
+#endif
         return 0;
 }
 
index 1eaa0e1..3352317 100644 (file)
@@ -377,7 +377,7 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
                            ldlm_blocking_callback blocking,
                            ldlm_completion_callback completion,
                            ldlm_glimpse_callback glimpse,
-                           void *data, __u32 lvb_len, void *lvb_swabber,
+                           void *data, __u32 lvb_len,
                            const __u64 *client_cookie,
                            struct lustre_handle *lockh)
 {
@@ -406,7 +406,6 @@ int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
         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;
@@ -476,7 +475,7 @@ static void failed_lock_cleanup(struct ldlm_namespace *ns,
 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 lustre_handle *lockh,int rc)
 {
         struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
         int is_replay = *flags & LDLM_FL_REPLAY;
@@ -509,9 +508,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                                 req_capsule_set_size(&req->rq_pill,
                                                      &RMF_DLM_LVB, RCL_SERVER,
                                                      lvb_len);
-                            tmplvb = req_capsule_server_swab_get(&req->rq_pill,
-                                                                 &RMF_DLM_LVB,
-                                                                 lvb_swabber);
+                            tmplvb = req_capsule_server_get(&req->rq_pill,
+                                                                 &RMF_DLM_LVB);
                                 if (tmplvb == NULL)
                                         GOTO(cleanup, rc = -EPROTO);
                                 if (lvb != NULL)
@@ -534,9 +532,9 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
 
         /* Key change rehash lock in per-export hash with new key */
         if (exp->exp_lock_hash)
-                lustre_hash_rehash_key(exp->exp_lock_hash, &old_hash_key,
-                                       &lock->l_remote_handle,
-                                       &lock->l_exp_hash);
+                cfs_hash_rehash_key(exp->exp_lock_hash, &old_hash_key,
+                                    &lock->l_remote_handle,
+                                    &lock->l_exp_hash);
 
         *flags = reply->lock_flags;
         lock->l_flags |= reply->lock_flags & LDLM_INHERIT_FLAGS;
@@ -606,9 +604,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
 
                 req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER,
                                      lvb_len);
-                tmplvb = req_capsule_server_swab_get(&req->rq_pill,
-                                                     &RMF_DLM_LVB,
-                                                     lvb_swabber);
+                tmplvb = req_capsule_server_get(&req->rq_pill,
+                                                     &RMF_DLM_LVB);
                 if (tmplvb == NULL)
                         GOTO(cleanup, rc = -EPROTO);
                 memcpy(lock->l_lvb_data, tmplvb, lvb_len);
@@ -758,8 +755,8 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                      struct ldlm_enqueue_info *einfo,
                      const 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)
+                     void *lvb, __u32 lvb_len, struct lustre_handle *lockh,
+                     int async)
 {
         struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
         struct ldlm_lock      *lock;
@@ -794,7 +791,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                 /* 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
@@ -880,7 +876,7 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
 
         err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0,
                                     einfo->ei_mode, flags, lvb, lvb_len,
-                                    lvb_swabber, lockh, rc);
+                                    lockh, rc);
 
         /* If ldlm_cli_enqueue_fini did not find the lock, we need to free
          * one reference that we took */
@@ -1997,9 +1993,9 @@ static int replay_lock_interpret(const struct lu_env *env,
         /* Key change rehash lock in per-export hash with new key */
         exp = req->rq_export;
         if (exp && exp->exp_lock_hash)
-                lustre_hash_rehash_key(exp->exp_lock_hash, &old_hash_key,
-                                       &lock->l_remote_handle,
-                                       &lock->l_exp_hash);
+                cfs_hash_rehash_key(exp->exp_lock_hash, &old_hash_key,
+                                    &lock->l_remote_handle,
+                                    &lock->l_exp_hash);
 
         LDLM_DEBUG(lock, "replayed lock:");
         ptlrpc_import_recovery_state_machine(req->rq_import);
index b1e65f0..f30cdaf 100644 (file)
@@ -382,12 +382,8 @@ int llu_md_close(struct obd_export *md_exp, struct inode *inode)
         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);
-        }
+        if (fd->fd_flags & LL_FILE_GROUP_LOCKED)
+                llu_put_grouplock(inode, fd->fd_grouplock.cg_gid);
 
         op_data.op_attr.ia_valid = ATTR_MODE | ATTR_ATIME_SET |
                                 ATTR_MTIME_SET | ATTR_CTIME_SET;
index 3f67427..afbde6c 100644 (file)
@@ -58,8 +58,7 @@
 struct ll_file_data {
         struct obd_client_handle fd_mds_och;
         __u32 fd_flags;
-        struct lustre_handle fd_cwlockh;
-        unsigned long fd_gid;
+        struct ccc_grouplock fd_grouplock;
 };
 
 struct llu_sb_info {
@@ -235,6 +234,7 @@ int llu_inode_getattr(struct inode *inode, struct obdo *obdo);
 int llu_md_setattr(struct inode *inode, struct md_op_data *op_data,
                    struct md_open_data **mod);
 int llu_setattr_raw(struct inode *inode, struct iattr *attr);
+int llu_put_grouplock(struct inode *inode, unsigned long arg);
 
 extern struct fssw_ops llu_fssw_ops;
 
index de5f687..bbb2dfb 100644 (file)
@@ -1410,7 +1410,7 @@ static int llu_file_flock(struct inode *ino,
 
                 if (lmv->tgts[0].ltd_exp != NULL)
                         rc = ldlm_cli_enqueue(lmv->tgts[0].ltd_exp, NULL, &einfo, &res_id,
-                                              &flock, &flags, NULL, 0, NULL, &lockh, 0);
+                                              &flock, &flags, NULL, 0, &lockh, 0);
                 else
                         rc = -ENODEV;
         }
@@ -1599,56 +1599,51 @@ 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;
+        int rc;
+        struct ccc_grouplock grouplock;
         ENTRY;
 
+        if (fd->fd_flags & LL_FILE_IGNORE_LOCK) {
+                RETURN(-ENOTSUPP);
+        }
         if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
                 RETURN(-EINVAL);
         }
+        LASSERT(fd->fd_grouplock.cg_lock == NULL);
 
-        policy.l_extent.gid = arg;
-        if (lli->lli_open_flags & O_NONBLOCK)
-                flags = LDLM_FL_BLOCK_NOWAIT;
+        rc = cl_get_grouplock(cl_i2info(inode)->lli_clob,
+                              arg, (lli->lli_open_flags & O_NONBLOCK),
+                              &grouplock);
 
-        err = llu_extent_lock(fd, inode, lsm, LCK_GROUP, &policy, &lockh,
-                              flags);
-        if (err)
-                RETURN(err);
+        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));
+        fd->fd_flags |= LL_FILE_GROUP_LOCKED;
+        fd->fd_grouplock = grouplock;
 
         RETURN(0);
 }
 
-static int llu_put_grouplock(struct inode *inode, unsigned long arg)
+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;
+        struct ccc_grouplock grouplock;
         ENTRY;
 
         if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED))
                 RETURN(-EINVAL);
 
-        if (fd->fd_gid != arg)
-                RETURN(-EINVAL);
+        LASSERT(fd->fd_grouplock.cg_lock != NULL);
 
-        fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK);
+        if (fd->fd_grouplock.cg_gid != arg)
+                RETURN(-EINVAL);
 
-        err = llu_extent_unlock(fd, inode, lsm, LCK_GROUP, &fd->fd_cwlockh);
-        if (err)
-                RETURN(err);
+        grouplock = fd->fd_grouplock;
+        memset(&fd->fd_grouplock, 0, sizeof(fd->fd_grouplock));
+        fd->fd_flags &= ~LL_FILE_GROUP_LOCKED;
 
-        fd->fd_gid = 0;
-        memset(&fd->fd_cwlockh, 0, sizeof(fd->fd_cwlockh));
+        cl_put_grouplock(&grouplock);
 
         RETURN(0);
 }
index 30e0134..0032abf 100644 (file)
@@ -338,8 +338,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, int exact,
                          * entries with smaller hash values. Stale page should
                          * be invalidated, and new one fetched.
                          */
-                        CWARN("Stale readpage page %p: "LPX64" != "LPX64"\n",
-                              page, hash, start);
+                        CDEBUG(D_OTHER, "Stale readpage page %p: "LPX64" != "LPX64"\n",
+                               page, hash, start);
                         ll_release_page(page, hash, start, end);
                 } else {
                         GOTO(hash_collision, page);
@@ -838,7 +838,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                         lump = &lmdp->lmd_lmm;
                 }
                 if (copy_to_user(lump, lmm, lmmsize))
-                        GOTO(out_lmm, rc = -EFAULT);
+                        GOTO(out_req, rc = -EFAULT);
         skip_lmm:
                 if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
                         struct lov_user_mds_data *lmdp;
@@ -860,13 +860,10 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
 
                         lmdp = (struct lov_user_mds_data *)arg;
                         if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st)))
-                                GOTO(out_lmm, rc = -EFAULT);
+                                GOTO(out_req, 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)
@@ -920,10 +917,6 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 if (rc < 0)
                         GOTO(free_lmm, rc = -ENOMEM);
 
-                rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp, lsm);
-                if (rc)
-                        GOTO(free_lsm, rc);
-
                 /* Perform glimpse_size operation. */
                 memset(&st, 0, sizeof(st));
 
index 5fa062d..1bc7e0b 100644 (file)
@@ -331,6 +331,10 @@ int ll_file_release(struct inode *inode, struct file *file)
         lli->lli_async_rc = 0;
 
         rc = ll_md_close(sbi->ll_md_exp, inode, file);
+
+        if (OBD_FAIL_TIMEOUT_MS(OBD_FAIL_PTLRPC_DUMP_LOG, obd_fail_val))
+                libcfs_debug_dumplog();
+
         RETURN(rc);
 }
 
@@ -812,7 +816,10 @@ static ssize_t ll_file_io_generic(const struct lu_env *env,
         if (cl_io_rw_init(env, io, iot, *ppos, count) == 0) {
                 struct vvp_io *vio = vvp_env_io(env);
                 struct ccc_io *cio = ccc_env_io(env);
+                struct ll_inode_info *lli = ll_i2info(file->f_dentry->d_inode);
+                int write_sem_locked = 0;
 
+                cio->cui_fd  = LUSTRE_FPRIVATE(file);
                 vio->cui_io_subtype = args->via_io_subtype;
 
                 switch (vio->cui_io_subtype) {
@@ -822,6 +829,11 @@ static ssize_t ll_file_io_generic(const struct lu_env *env,
 #ifndef HAVE_FILE_WRITEV
                         cio->cui_iocb = args->u.normal.via_iocb;
 #endif
+                        if ((iot == CIT_WRITE) &&
+                            !(cio->cui_fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
+                                down(&lli->lli_write_sem);
+                                write_sem_locked = 1;
+                        }
                         break;
                 case IO_SENDFILE:
                         vio->u.sendfile.cui_actor = args->u.sendfile.via_actor;
@@ -835,8 +847,9 @@ static ssize_t ll_file_io_generic(const struct lu_env *env,
                         CERROR("Unknow IO type - %u\n", vio->cui_io_subtype);
                         LBUG();
                 }
-                cio->cui_fd  = LUSTRE_FPRIVATE(file);
                 result = cl_io_loop(env, io);
+                if (write_sem_locked)
+                        up(&lli->lli_write_sem);
         } else {
                 /* cl_io_rw_init() handled IO */
                 result = io->ci_result;
@@ -1291,8 +1304,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
         LASSERT(lmm != NULL);
 
         if ((lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V1)) &&
-            (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V3)) &&
-            (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_JOIN))) {
+            (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V3))) {
                 GOTO(out, rc = -EPROTO);
         }
 
@@ -1316,62 +1328,9 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
                                 lustre_swab_lov_user_md_objects(
                                  ((struct lov_user_md_v3 *)lmm)->lmm_objects,
                                  ((struct lov_user_md_v3 *)lmm)->lmm_stripe_count);
-                } else if (lmm->lmm_magic == cpu_to_le32(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_dt_exp, &lsm, lmm, lmmsize);
-                if (rc < 0)
-                        GOTO(out, rc = -ENOMEM);
-                rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_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_dt_exp, &lsm);
-        }
 out:
         *lmmp = lmm;
         *lmm_size = lmmsize;
@@ -1464,7 +1423,7 @@ int ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg)
 
         spin_lock(&lli->lli_lock);
         if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
-                CERROR("group lock already existed with gid %lu\n",
+                CWARN("group lock already existed with gid %lu\n",
                        fd->fd_grouplock.cg_gid);
                 spin_unlock(&lli->lli_lock);
                 RETURN(-EINVAL);
@@ -1503,22 +1462,20 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg)
         spin_lock(&lli->lli_lock);
         if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
                 spin_unlock(&lli->lli_lock);
-                CERROR("no group lock held\n");
+                CWARN("no group lock held\n");
                 RETURN(-EINVAL);
         }
         LASSERT(fd->fd_grouplock.cg_lock != NULL);
 
         if (fd->fd_grouplock.cg_gid != arg) {
-                CERROR("group lock %lu doesn't match current id %lu\n",
+                CWARN("group lock %lu doesn't match current id %lu\n",
                        arg, fd->fd_grouplock.cg_gid);
                 spin_unlock(&lli->lli_lock);
                 RETURN(-EINVAL);
         }
 
         grouplock = fd->fd_grouplock;
-        fd->fd_grouplock.cg_env = NULL;
-        fd->fd_grouplock.cg_lock = NULL;
-        fd->fd_grouplock.cg_gid = 0;
+        memset(&fd->fd_grouplock, 0, sizeof(fd->fd_grouplock));
         fd->fd_flags &= ~LL_FILE_GROUP_LOCKED;
         spin_unlock(&lli->lli_lock);
 
@@ -1527,179 +1484,6 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg)
         RETURN(0);
 }
 
-#if LUSTRE_FIX >= 50
-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,
-                                    .it_create_mode = M_JOIN_FILE};
-        struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CW,
-                ll_md_blocking_ast, ldlm_completion_ast, NULL, NULL, NULL };
-
-        struct lustre_handle lockh;
-        struct md_op_data *op_data;
-        int    rc;
-        loff_t data;
-        ENTRY;
-
-        tail_dentry = tail_filp->f_dentry;
-
-        data = i_size_read(head_inode);
-        op_data = ll_prep_md_op_data(NULL, head_inode,
-                                     tail_dentry->d_parent->d_inode,
-                                     tail_dentry->d_name.name,
-                                     tail_dentry->d_name.len, 0,
-                                     LUSTRE_OPC_ANY, &data);
-        if (IS_ERR(op_data))
-                RETURN(PTR_ERR(op_data));
-
-        rc = md_enqueue(ll_i2mdexp(head_inode), &einfo, &oit,
-                         op_data, &lockh, NULL, 0, NULL, 0);
-
-        ll_finish_md_op_data(op_data);
-        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;
-        }
-        ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data);
-        it_clear_disposition(&oit, DISP_ENQ_COMPLETE);
-        ll_release_openhandle(head_filp->f_dentry, &oit);
-out:
-        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);
-        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);
-
-        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_i2dtexp(second),
-                                  ll_i2info(second)->lli_smd, 0, NULL);
-        case 2:
-                ll_tree_unlock(&first_tree);
-                obd_cancel_unused(ll_i2dtexp(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_dt_exp,
-                                       &hlli->lli_smd);
-                        hlli->lli_smd = NULL;
-                }
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        RETURN(rc);
-}
-#endif /* LUSTRE_FIX >= 50 */
-
 /**
  * Close inode open handle
  *
@@ -1749,7 +1533,7 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
  * Get size for inode for which FIEMAP mapping is requested.
  * Make the FIEMAP get_info call and returns the result.
  */
-int ll_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
+int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
               int num_bytes)
 {
         struct obd_export *exp = ll_i2dtexp(inode);
@@ -1922,7 +1706,7 @@ int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                                 GOTO(error, rc);
                 }
 
-                rc = ll_fiemap(inode, fiemap_s, num_bytes);
+                rc = ll_do_fiemap(inode, fiemap_s, num_bytes);
                 if (rc)
                         GOTO(error, rc);
 
@@ -1945,23 +1729,6 @@ error:
         case FSFILT_IOC_GETVERSION_OLD:
         case FSFILT_IOC_GETVERSION:
                 RETURN(put_user(inode->i_generation, (int *)arg));
-        case LL_IOC_JOIN: {
-#if LUSTRE_FIX >= 50
-                /* Allow file join in beta builds to allow debuggging */
-                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);
-#else
-                CWARN("file join is not supported in this version of Lustre\n");
-                RETURN(-ENOTTY);
-#endif
-        }
         case LL_IOC_GROUP_LOCK:
                 RETURN(ll_get_grouplock(inode, file, arg));
         case LL_IOC_GROUP_UNLOCK:
@@ -2437,6 +2204,26 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
         return ll_getattr_it(mnt, de, &it, stat);
 }
 
+#ifdef HAVE_LINUX_FIEMAP_H
+int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
+                __u64 start, __u64 len)
+{
+        int rc;
+        struct ll_user_fiemap *fiemap = (struct ll_user_fiemap*)(
+                fieinfo->fi_extents_start - sizeof(ll_user_fiemap));
+
+        rc = ll_do_fiemap(inode, fiemap, sizeof(*fiemap) +
+                          fiemap->fm_extent_count *
+                          sizeof(struct ll_fiemap_extent));
+
+        fieinfo->fi_flags = fiemap->fm_flags;
+        fieinfo->fi_extents_mapped = fiemap->fm_mapped_extents;
+
+        return rc;
+}
+#endif
+
+
 static
 int lustre_check_acl(struct inode *inode, int mask)
 {
@@ -2638,6 +2425,9 @@ struct inode_operations ll_file_inode_operations = {
         .getxattr       = ll_getxattr,
         .listxattr      = ll_listxattr,
         .removexattr    = ll_removexattr,
+#ifdef  HAVE_LINUX_FIEMAP_H
+        .fiemap         = ll_fiemap,
+#endif
 };
 
 /* dynamic ioctl number support routins */
index 62870d2..930399f 100644 (file)
@@ -121,6 +121,7 @@ struct ll_inode_info {
         struct semaphore        lli_size_sem;           /* protect open and change size */
         void                   *lli_size_sem_owner;
         struct semaphore        lli_write_sem;
+        struct semaphore        lli_trunc_sem;
         char                   *lli_symlink_name;
         __u64                   lli_maxbytes;
         __u64                   lli_ioepoch;
@@ -295,7 +296,6 @@ enum stats_track_type {
 #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_RMT_CLIENT        0x40 /* remote client */
 #define LL_SBI_MDS_CAPA          0x80 /* support mds capa */
 #define LL_SBI_OSS_CAPA         0x100 /* support oss capa */
@@ -658,7 +658,7 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
 int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmm,
                      int *lmm_size, struct ptlrpc_request **request);
 int ll_fsync(struct file *file, struct dentry *dentry, int data);
-int ll_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
+int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
               int num_bytes);
 int ll_merge_lvb(struct inode *inode);
 int ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg);
@@ -831,15 +831,6 @@ struct vvp_io {
          */
         int                  cui_ra_window_set;
         /**
-         * If IO was created directly in low level method like
-         * ->prepare_write(), this field stores the number of method calls
-         * that constitute this IO. This field is decremented by ll_cl_fini(),
-         * and cl_io is destroyed, when it reaches 0. When oneshot IO
-         * completes, this fields is set to -1.
-         */
-
-        int                  cui_oneshot;
-        /**
          * Partially truncated page, that vvp_io_trunc_start() keeps locked
          * across truncate.
          */
@@ -872,6 +863,15 @@ struct vvp_io_args {
         } u;
 };
 
+struct ll_cl_context {
+        void           *lcc_cookie;
+        struct cl_io   *lcc_io;
+        struct cl_page *lcc_page;
+        struct lu_env  *lcc_env;
+        int             lcc_refcheck;
+        int             lcc_created;
+};
+
 struct vvp_thread_info {
         struct ost_lvb       vti_lvb;
         struct cl_2queue     vti_queue;
@@ -879,6 +879,7 @@ struct vvp_thread_info {
         struct vvp_io_args   vti_args;
         struct ra_io_arg     vti_ria;
         struct kiocb         vti_kiocb;
+        struct ll_cl_context vti_io_ctx;
 };
 
 static inline struct vvp_thread_info *vvp_env_info(const struct lu_env *env)
@@ -902,7 +903,7 @@ static inline struct vvp_io_args *vvp_env_args(const struct lu_env *env,
 }
 
 struct vvp_session {
-        struct vvp_io vs_ios;
+        struct vvp_io         vs_ios;
 };
 
 static inline struct vvp_session *vvp_env_session(const struct lu_env *env)
index 11c65e1..9b244da 100644 (file)
@@ -303,9 +303,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
                 sbi->ll_flags &= ~LL_SBI_ACL;
         }
 
-        if (data->ocd_connect_flags & OBD_CONNECT_JOIN)
-                sbi->ll_flags |= LL_SBI_JOIN;
-
         if (data->ocd_connect_flags & OBD_CONNECT_RMT_CLIENT) {
                 if (!(sbi->ll_flags & LL_SBI_RMT_CLIENT)) {
                         sbi->ll_flags |= LL_SBI_RMT_CLIENT;
@@ -865,6 +862,7 @@ 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);
+        sema_init(&lli->lli_trunc_sem, 1);
         lli->lli_flags = 0;
         lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
         spin_lock_init(&lli->lli_lock);
@@ -1327,6 +1325,14 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
 
+        UNLOCK_INODE_MUTEX(inode);
+        if (ia_valid & ATTR_SIZE)
+                UP_WRITE_I_ALLOC_SEM(inode);
+        down(&lli->lli_trunc_sem);
+        LOCK_INODE_MUTEX(inode);
+        if (ia_valid & ATTR_SIZE)
+                DOWN_WRITE_I_ALLOC_SEM(inode);
+
         memcpy(&op_data->op_attr, attr, sizeof(*attr));
 
         /* Open epoch for truncate. */
@@ -1358,6 +1364,7 @@ out:
                         rc1 = ll_setattr_done_writing(inode, op_data, mod);
                 ll_finish_md_op_data(op_data);
         }
+        up(&lli->lli_trunc_sem);
         return rc ? rc : rc1;
 }
 
@@ -1507,23 +1514,6 @@ void ll_inode_size_unlock(struct inode *inode, int unlock_lsm)
         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_i2dtexp(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);
@@ -1535,8 +1525,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
         if (lsm != NULL) {
                 if (lli->lli_smd == NULL) {
                         if (lsm->lsm_magic != LOV_MAGIC_V1 &&
-                            lsm->lsm_magic != LOV_MAGIC_V3 &&
-                            lsm->lsm_magic != LOV_MAGIC_JOIN) {
+                            lsm->lsm_magic != LOV_MAGIC_V3) {
                                 dump_lsm(D_ERROR, lsm);
                                 LBUG();
                         }
@@ -1552,21 +1541,17 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
                         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 {
-                                cl_inode_init(inode, md);
-                                ll_replace_lsm(inode, lsm);
+                        LASSERT(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();
                         }
                 }
                 if (lli->lli_smd != lsm)
@@ -2023,8 +2008,6 @@ int ll_prep_inode(struct inode **inode,
                 }
         }
 
-        rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp,
-                         ll_i2info(*inode)->lli_smd);
 out:
         md_free_lustre_md(sbi->ll_md_exp, &md);
         RETURN(rc);
index a5177de..187cfea 100644 (file)
@@ -1106,10 +1106,6 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
         }
         LASSERT(rc >= sizeof(*lsm));
 
-        rc = obd_checkmd(ll_i2dtexp(dir), ll_i2mdexp(dir), lsm);
-        if (rc)
-                GOTO(out_free_memmd, rc);
-
         OBDO_ALLOC(oa);
         if (oa == NULL)
                 GOTO(out_free_memmd, rc = -ENOMEM);
index 0247349..3f9c15c 100644 (file)
@@ -130,132 +130,149 @@ void ll_truncate(struct inode *inode)
 } /* ll_truncate */
 
 /**
+ * Finalizes cl-data before exiting typical address_space operation. Dual to
+ * ll_cl_init().
+ */
+static void ll_cl_fini(struct ll_cl_context *lcc)
+{
+        struct lu_env  *env  = lcc->lcc_env;
+        struct cl_io   *io   = lcc->lcc_io;
+        struct cl_page *page = lcc->lcc_page;
+
+        LASSERT(lcc->lcc_cookie == current);
+        LASSERT(env != NULL);
+
+        if (page != NULL) {
+                lu_ref_del(&page->cp_reference, "cl_io", io);
+                cl_page_put(env, page);
+        }
+
+        if (io && lcc->lcc_created) {
+                cl_io_end(env, io);
+                cl_io_unlock(env, io);
+                cl_io_iter_fini(env, io);
+                cl_io_fini(env, io);
+        }
+        cl_env_put(env, &lcc->lcc_refcheck);
+}
+
+/**
  * Initializes common cl-data at the typical address_space operation entry
  * point.
  */
-static int ll_cl_init(struct file *file, struct page *vmpage,
-                      struct lu_env **env,
-                      struct cl_io **io, struct cl_page **page, int *refcheck)
+static struct ll_cl_context *ll_cl_init(struct file *file,
+                                        struct page *vmpage, int create)
 {
-        struct lu_env    *_env;
-        struct cl_io     *_io;
-        struct cl_page   *_page;
+        struct ll_cl_context *lcc;
+        struct lu_env    *env;
+        struct cl_io     *io;
         struct cl_object *clob;
+        struct ccc_io    *cio;
 
-        int result;
-
-        *env  = NULL;
-        *io   = NULL;
-        *page = NULL;
+        int refcheck;
+        int result = 0;
 
         clob = ll_i2info(vmpage->mapping->host)->lli_clob;
         LASSERT(clob != NULL);
 
-        _env = cl_env_get(refcheck);
-        if (!IS_ERR(env)) {
-                struct ccc_io *cio = ccc_env_io(_env);
-
-                *env = _env;
-                *io  = _io = cio->cui_cl.cis_io;
-                if (_io != NULL) {
-                        LASSERT(_io->ci_state == CIS_IO_GOING);
-                        LASSERT(cio->cui_fd == LUSTRE_FPRIVATE(file));
-                        _page = cl_page_find(_env, clob, vmpage->index, vmpage,
-                                             CPT_CACHEABLE);
-                        if (!IS_ERR(_page)) {
-                                *page = _page;
-                                lu_ref_add(&_page->cp_reference, "cl_io", _io);
-                                result = 0;
-                        } else
-                                result = PTR_ERR(_page);
-                } else
-                        /*
-                         * This is for a case where operation can be called
-                         * either with or without cl_io created by the upper
-                         * layer (e.g., ->prepare_write() called directly from
-                         * loop-back driver).
-                         */
-                        result = -EALREADY;
-        } else
-                result = PTR_ERR(_env);
-        CDEBUG(D_VFSTRACE, "%lu@"DFID" -> %i %p %p %p\n",
-               vmpage->index, PFID(lu_object_fid(&clob->co_lu)), result,
-               *env, *io, *page);
-        return result;
-}
+        env = cl_env_get(&refcheck);
+        if (IS_ERR(env))
+                return ERR_PTR(PTR_ERR(env));
 
-/**
- * Finalizes cl-data before exiting typical address_space operation. Dual to
- * ll_cl_init().
- */
-static void ll_cl_fini(struct lu_env *env,
-                       struct cl_io *io, struct cl_page *page, int *refcheck)
-{
-        if (page != NULL) {
-                lu_ref_del(&page->cp_reference, "cl_io", io);
-                cl_page_put(env, page);
-        }
-        if (env != NULL) {
+        lcc = &vvp_env_info(env)->vti_io_ctx;
+        memset(lcc, 0, sizeof(*lcc));
+        lcc->lcc_env = env;
+        lcc->lcc_refcheck = refcheck;
+        lcc->lcc_cookie = current;
+
+        cio = ccc_env_io(env);
+        io = cio->cui_cl.cis_io;
+        if (io == NULL && create) {
                 struct vvp_io *vio;
+                loff_t pos;
+
+                /*
+                 * Loop-back driver calls ->prepare_write() and ->sendfile()
+                 * methods directly, bypassing file system ->write() operation,
+                 * so cl_io has to be created here.
+                 */
 
+                io = &ccc_env_info(env)->cti_io;
                 vio = vvp_env_io(env);
-                LASSERT(vio->cui_oneshot >= 0);
-                if (vio->cui_oneshot > 0) {
-                        if (--vio->cui_oneshot == 0) {
-                                cl_io_end(env, io);
-                                cl_io_unlock(env, io);
-                                cl_io_iter_fini(env, io);
-                                cl_io_fini(env, io);
-                                /* to trigger assertion above, if ll_cl_fini()
-                                 * is called against freed io. */
-                                vio->cui_oneshot = -1;
+                ll_io_init(io, file, 1);
+
+                /* No lock at all for this kind of IO - we can't do it because
+                 * we have held page lock, it would cause deadlock.
+                 * XXX: This causes poor performance to loop device - One page
+                 *      per RPC.
+                 *      In order to get better performance, users should use
+                 *      lloop driver instead.
+                 */
+                io->ci_lockreq = CILR_NEVER;
+
+                pos = (vmpage->index << CFS_PAGE_SHIFT);
+
+                /* Create a temp IO to serve write. */
+                result = cl_io_rw_init(env, io, CIT_WRITE, pos, CFS_PAGE_SIZE);
+                if (result == 0) {
+                        cio->cui_fd = LUSTRE_FPRIVATE(file);
+                        cio->cui_iov = NULL;
+                        cio->cui_nrsegs = 0;
+                        result = cl_io_iter_init(env, io);
+                        if (result == 0) {
+                                result = cl_io_lock(env, io);
+                                if (result == 0)
+                                        result = cl_io_start(env, io);
                         }
-                        /* additional reference on env was acquired by io,
-                         * disable refcheck */
-                        refcheck = NULL;
-                }
-                cl_env_put(env, refcheck);
-        } else
-                LASSERT(io == NULL);
+                } else
+                        result = io->ci_result;
+                lcc->lcc_created = 1;
+        }
+
+        lcc->lcc_io = io;
+        if (io == NULL)
+                result = -EIO;
+        if (result == 0) {
+                struct cl_page   *page;
+
+                LASSERT(io != NULL);
+                LASSERT(io->ci_state == CIS_IO_GOING);
+                LASSERT(cio->cui_fd == LUSTRE_FPRIVATE(file));
+                page = cl_page_find(env, clob, vmpage->index, vmpage,
+                                    CPT_CACHEABLE);
+                if (!IS_ERR(page)) {
+                        lcc->lcc_page = page;
+                        lu_ref_add(&page->cp_reference, "cl_io", io);
+                        result = 0;
+                } else
+                        result = PTR_ERR(page);
+        }
+        if (result) {
+                ll_cl_fini(lcc);
+                lcc = ERR_PTR(result);
+        }
+
+        CDEBUG(D_VFSTRACE, "%lu@"DFID" -> %i %p %p\n",
+               vmpage->index, PFID(lu_object_fid(&clob->co_lu)), result,
+               env, io);
+        return lcc;
 }
 
-/**
- * Initializes one-shot cl_io for the case when loop driver calls
- * ->{prepare,commit}_write() methods directly.
- */
-static int ll_prepare_loop(struct lu_env *env, struct cl_io *io,
-                           struct file *file, struct page *vmpage,
-                           unsigned from, unsigned to)
+static struct ll_cl_context *ll_cl_get(void)
 {
-        struct vvp_io *vio;
-        struct ccc_io *cio;
-        int result;
-        loff_t pos;
+        struct ll_cl_context *lcc;
+        struct lu_env *env;
+        int refcheck;
 
-        vio = vvp_env_io(env);
-        cio = ccc_env_io(env);
-        ll_io_init(io, file, 1);
-        pos = (vmpage->index << CFS_PAGE_SHIFT) + from;
-        /*
-         * Create IO and quickly drive it through CIS_{INIT,IT_STARTED,LOCKED}
-         * states. DLM locks are not taken for vio->cui_oneshot IO---we cannot
-         * take DLM locks here, because page is already locked. With new
-         * ->write_{being,end}() address_space operations lustre might be
-         * luckier.
-         */
-        result = cl_io_rw_init(env, io, CIT_WRITE, pos, from - to);
-        if (result == 0) {
-                cio->cui_fd = LUSTRE_FPRIVATE(file);
-                vio->cui_oneshot = 1;
-                result = cl_io_iter_init(env, io);
-                if (result == 0) {
-                        result = cl_io_lock(env, io);
-                        if (result == 0)
-                                result = cl_io_start(env, io);
-                }
-        } else
-                result = io->ci_result;
-        return result;
+        env = cl_env_get(&refcheck);
+        LASSERT(!IS_ERR(env));
+        lcc = &vvp_env_info(env)->vti_io_ctx;
+        LASSERT(env == lcc->lcc_env);
+        LASSERT(current == lcc->lcc_cookie);
+        cl_env_put(env, &refcheck);
+
+        /* env has got in ll_cl_init, so it is still usable. */
+        return lcc;
 }
 
 /**
@@ -265,29 +282,16 @@ static int ll_prepare_loop(struct lu_env *env, struct cl_io *io,
 int ll_prepare_write(struct file *file, struct page *vmpage, unsigned from,
                      unsigned to)
 {
-        struct lu_env    *env;
-        struct cl_io     *io;
-        struct cl_page   *page;
+        struct ll_cl_context *lcc;
         int result;
-        int refcheck;
         ENTRY;
 
-        result = ll_cl_init(file, vmpage, &env, &io, &page, &refcheck);
-        /*
-         * Loop-back driver calls ->prepare_write() and ->sendfile() methods
-         * directly, bypassing file system ->write() operation, so cl_io has
-         * to be created here.
-         */
-        if (result == -EALREADY) {
-                io = &ccc_env_info(env)->cti_io;
-                result = ll_prepare_loop(env, io, file, vmpage, from, to);
-                if (result == 0) {
-                        result = ll_cl_init(file, vmpage,
-                                            &env, &io, &page, &refcheck);
-                        cl_env_put(env, NULL);
-                }
-        }
-        if (result == 0) {
+        lcc = ll_cl_init(file, vmpage, 1);
+        if (!IS_ERR(lcc)) {
+                struct lu_env  *env = lcc->lcc_env;
+                struct cl_io   *io  = lcc->lcc_io;
+                struct cl_page *page = lcc->lcc_page;
+
                 cl_page_assume(env, io, page);
                 if (cl_io_is_append(io)) {
                         struct cl_object   *obj   = io->ci_obj;
@@ -302,8 +306,6 @@ int ll_prepare_write(struct file *file, struct page *vmpage, unsigned from,
                 }
                 result = cl_io_prepare_write(env, io, page, from, to);
                 if (result == 0) {
-                        struct vvp_io *vio;
-
                         /*
                          * Add a reference, so that page is not evicted from
                          * the cache until ->commit_write() is called.
@@ -311,40 +313,43 @@ int ll_prepare_write(struct file *file, struct page *vmpage, unsigned from,
                         cl_page_get(page);
                         lu_ref_add(&page->cp_reference, "prepare_write",
                                    cfs_current());
-                        vio = vvp_env_io(env);
-                        if (vio->cui_oneshot > 0)
-                                vio->cui_oneshot++;
-                } else
+                } else {
                         cl_page_unassume(env, io, page);
+                        ll_cl_fini(lcc);
+                }
+                /* returning 0 in prepare assumes commit must be called
+                 * afterwards */
+        } else {
+                result = PTR_ERR(lcc);
         }
-        ll_cl_fini(env, io, page, &refcheck);
         RETURN(result);
 }
 
 int ll_commit_write(struct file *file, struct page *vmpage, unsigned from,
                     unsigned to)
 {
+        struct ll_cl_context *lcc;
         struct lu_env    *env;
         struct cl_io     *io;
         struct cl_page   *page;
         int result;
-        int refcheck;
         ENTRY;
 
-        result = ll_cl_init(file, vmpage, &env, &io, &page, &refcheck);
-        LASSERT(result != -EALREADY);
-        if (result == 0) {
-                LASSERT(cl_page_is_owned(page, io));
-                result = cl_io_commit_write(env, io, page, from, to);
-                if (cl_page_is_owned(page, io))
-                        cl_page_unassume(env, io, page);
-                /*
-                 * Release reference acquired by cl_io_prepare_write().
-                 */
-                lu_ref_del(&page->cp_reference, "prepare_write", cfs_current());
-                cl_page_put(env, page);
-        }
-        ll_cl_fini(env, io, page, &refcheck);
+        lcc  = ll_cl_get();
+        env  = lcc->lcc_env;
+        page = lcc->lcc_page;
+        io   = lcc->lcc_io;
+
+        LASSERT(cl_page_is_owned(page, io));
+        result = cl_io_commit_write(env, io, page, from, to);
+        if (cl_page_is_owned(page, io))
+                cl_page_unassume(env, io, page);
+        /*
+         * Release reference acquired by cl_io_prepare_write().
+         */
+        lu_ref_del(&page->cp_reference, "prepare_write", cfs_current());
+        cl_page_put(env, page);
+        ll_cl_fini(lcc);
         RETURN(result);
 }
 
@@ -1208,15 +1213,16 @@ int ll_writepage(struct page *vmpage, struct writeback_control *unused)
 
 int ll_readpage(struct file *file, struct page *vmpage)
 {
-        struct lu_env    *env;
-        struct cl_io     *io;
-        struct cl_page   *page;
+        struct ll_cl_context *lcc;
         int result;
-        int refcheck;
         ENTRY;
 
-        result = ll_cl_init(file, vmpage, &env, &io, &page, &refcheck);
-        if (result == 0) {
+        lcc = ll_cl_init(file, vmpage, 0);
+        if (!IS_ERR(lcc)) {
+                struct lu_env  *env  = lcc->lcc_env;
+                struct cl_io   *io   = lcc->lcc_io;
+                struct cl_page *page = lcc->lcc_page;
+
                 LASSERT(page->cp_type == CPT_CACHEABLE);
                 if (likely(!PageUptodate(vmpage))) {
                         cl_page_assume(env, io, page);
@@ -1227,9 +1233,10 @@ int ll_readpage(struct file *file, struct page *vmpage)
                         unlock_page(vmpage);
                         result = 0;
                 }
+                ll_cl_fini(lcc);
+        } else {
+                result = PTR_ERR(lcc);
         }
-        LASSERT(!cl_page_is_owned(page, io));
-        ll_cl_fini(env, io, page, &refcheck);
         RETURN(result);
 }
 
index 0d36a3b..28082be 100644 (file)
@@ -771,7 +771,7 @@ static int ll_statahead_thread(void *arg)
 
                 if (IS_ERR(page)) {
                         rc = PTR_ERR(page);
-                        CERROR("error reading dir "DFID" at "LPU64"/%u: rc %d\n",
+                        CDEBUG(D_READA, "error reading dir "DFID" at "LPU64"/%u: rc %d\n",
                                PFID(ll_inode2fid(dir)), pos,
                                sai->sai_index, rc);
                         break;
index 68f9e8d..a29574c 100644 (file)
@@ -88,9 +88,7 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)
         struct cl_object *obj = io->ci_obj;
 
         CLOBINVRNT(env, obj, ccc_object_invariant(obj));
-        if (io->ci_type == CIT_WRITE)
-                up(&ll_i2info(ccc_object_inode(obj))->lli_write_sem);
-        else {
+        if (io->ci_type == CIT_READ) {
                 struct vvp_io     *vio  = cl2vvp_io(env, ios);
                 struct ccc_io     *cio  = cl2ccc_io(env, ios);
 
@@ -180,7 +178,8 @@ static int vvp_mmap_locks(const struct lu_env *env,
                                                     policy.l_extent.start);
                         descr->cld_end = cl_index(descr->cld_obj,
                                                   policy.l_extent.end);
-                        result = cl_io_lock_alloc_add(env, io, descr, flags);
+                        descr->cld_enq_flags = flags;
+                        result = cl_io_lock_alloc_add(env, io, descr);
                         if (result < 0)
                                 RETURN(result);
 
@@ -202,7 +201,6 @@ static int vvp_io_rw_lock(const struct lu_env *env, struct cl_io *io,
         int ast_flags = 0;
 
         LASSERT(io->ci_type == CIT_READ || io->ci_type == CIT_WRITE);
-        LASSERT(vvp_env_io(env)->cui_oneshot == 0);
         ENTRY;
 
         ccc_io_update_iov(env, cio, io);
@@ -253,20 +251,15 @@ static int vvp_io_write_lock(const struct lu_env *env,
         struct cl_io *io = ios->cis_io;
         loff_t start;
         loff_t end;
-        int    result;
 
-        if (cl2vvp_io(env, ios)->cui_oneshot == 0) {
-                if (io->u.ci_wr.wr_append) {
-                        start = 0;
-                        end   = OBD_OBJECT_EOF;
-                } else {
-                        start = io->u.ci_wr.wr.crw_pos;
-                        end   = start + io->u.ci_wr.wr.crw_count - 1;
-                }
-                result = vvp_io_rw_lock(env, io, CLM_WRITE, start, end);
-        } else
-                result = 0;
-        return result;
+        if (io->u.ci_wr.wr_append) {
+                start = 0;
+                end   = OBD_OBJECT_EOF;
+        } else {
+                start = io->u.ci_wr.wr.crw_pos;
+                end   = start + io->u.ci_wr.wr.crw_count - 1;
+        }
+        return vvp_io_rw_lock(env, io, CLM_WRITE, start, end);
 }
 
 static int vvp_io_trunc_iter_init(const struct lu_env *env,
@@ -323,7 +316,6 @@ static int vvp_io_trunc_start(const struct lu_env *env,
         int                   result;
 
         LASSERT(cio->u.trunc.cui_locks_released);
-        LASSERT(vio->cui_oneshot == 0);
 
         LOCK_INODE_MUTEX(inode);
         DOWN_WRITE_I_ALLOC_SEM(inode);
@@ -440,7 +432,6 @@ static int vvp_io_read_start(const struct lu_env *env,
         int     exceed = 0;
 
         CLOBINVRNT(env, obj, ccc_object_invariant(obj));
-        LASSERT(vio->cui_oneshot == 0);
 
         CDEBUG(D_VFSTRACE, "read: -> [%lli, %lli)\n", pos, pos + cnt);
 
@@ -532,7 +523,7 @@ static int vvp_io_write_start(const struct lu_env *env,
 
         CDEBUG(D_VFSTRACE, "write: [%lli, %lli)\n", pos, pos + (long long)cnt);
 
-        if (cl2vvp_io(env, ios)->cui_oneshot > 0)
+        if (cio->cui_iov == NULL) /* from a temp io in ll_cl_init(). */
                 result = 0;
         else
                 result = lustre_generic_file_write(file, cio, &pos);
@@ -627,8 +618,6 @@ static int vvp_io_fault_start(const struct lu_env *env,
         loff_t               size;
         pgoff_t              last; /* last page in a file data region */
 
-        LASSERT(vio->cui_oneshot == 0);
-
         if (fio->ft_executable &&
             LTIME_S(inode->i_mtime) != vio->u.fault.ft_mtime)
                 CWARN("binary "DFID
@@ -700,7 +689,6 @@ static int vvp_io_read_page(const struct lu_env *env,
         int rc;
 
         CLOBINVRNT(env, obj, ccc_object_invariant(obj));
-        LASSERT(cl2vvp_io(env, ios)->cui_oneshot == 0);
         LASSERT(slice->cpl_obj == obj);
 
         ENTRY;
@@ -986,7 +974,6 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
 
         CL_IO_SLICE_CLEAN(cio, cui_cl);
         cl_io_slice_add(io, &cio->cui_cl, obj, &vvp_io_ops);
-        vio->cui_oneshot = 0;
         vio->cui_ra_window_set = 0;
         result = 0;
         if (io->ci_type == CIT_READ || io->ci_type == CIT_WRITE) {
@@ -996,8 +983,6 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
                 count = io->u.ci_rw.crw_count;
                 op    = io->ci_type == CIT_READ ?
                         LPROC_LL_READ_BYTES : LPROC_LL_WRITE_BYTES;
-                if (io->ci_type == CIT_WRITE)
-                        down(&ll_i2info(inode)->lli_write_sem);
                 /* "If nbyte is 0, read() will return 0 and have no other
                  *  results."  -- Single Unix Spec */
                 if (count == 0)
index b8bb7f1..f00f4f0 100644 (file)
@@ -305,13 +305,11 @@ int ll_getxattr_common(struct inode *inode, const char *name,
                     rce->rce_ops != RMT_RGETFACL))
                         RETURN(-EOPNOTSUPP);
         }
-#endif
 
         /* 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 &&
             !(sbi->ll_flags & LL_SBI_RMT_CLIENT)) {
                 struct ll_inode_info *lli = ll_i2info(inode);
@@ -382,13 +380,15 @@ do_getxattr:
                         GOTO(out, rc);
                 }
         }
-
-        if (xattr_type == XATTR_ACL_ACCESS_T && !body->eadatasize)
-                GOTO(out, rc = -ENODATA);
 #endif
-        LASSERT(buffer);
-        memcpy(buffer, xdata, body->eadatasize);
-        rc = body->eadatasize;
+
+        if (body->eadatasize == 0) {
+                rc = -ENODATA;
+        } else {
+                LASSERT(buffer);
+                memcpy(buffer, xdata, body->eadatasize);
+                rc = body->eadatasize;
+        }
         EXIT;
 out:
         ptlrpc_req_finished(req);
index dbc63dc..2a06147 100644 (file)
@@ -169,8 +169,6 @@ enum lov_layout_type {
         LLT_EMPTY,
         /** striped file */
         LLT_RAID0,
-        /** join file */
-        LLT_JOIN,
         LLT_NR
 };
 
@@ -239,8 +237,6 @@ struct lov_object {
                 } raid0;
                 struct lov_layout_state_empty {
                 } empty;
-                struct lov_layout_state_join {
-                } join;
         } u;
         /**
          * Thread that acquired lov_object::lo_type_guard in an exclusive
index 63f2dc7..aa7c299 100755 (executable)
@@ -168,33 +168,6 @@ lsm_stripe_by_offset_plain(struct lov_stripe_md *lsm, int *stripeno,
                 *swidth = (obd_off)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)
 {
@@ -258,379 +231,10 @@ const struct lsm_operations lsm_v1_ops = {
         .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_v1,
         .lsm_unpackmd           = lsm_unpackmd_v1,
 };
 
-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, obd_off *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 = (obd_off)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, obd_off *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 = (obd_off)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 =
-                                   le32_to_cpu(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.lgl_oid = le64_to_cpu(logid->lgl_oid);
-        lai->lai_array_id.lgl_ogr = le64_to_cpu(logid->lgl_ogr);
-        lai->lai_array_id.lgl_ogen = le32_to_cpu(logid->lgl_ogen);
-        lai->lai_ext_count = le32_to_cpu(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);
-}
-
-const 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,
-};
-
-
 static int lsm_lmm_verify_v3(struct lov_mds_md *lmmv1, int lmm_bytes,
                              int *stripe_count)
 {
@@ -697,10 +301,6 @@ const struct lsm_operations lsm_v3_ops = {
         .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_v3,
         .lsm_unpackmd           = lsm_unpackmd_v3,
 };
index 19e9fd3..b76627f 100644 (file)
@@ -280,18 +280,13 @@ int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count,
 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);
 void lov_dump_lmm_v3(int level, struct lov_mds_md_v3 *lmm);
 void lov_dump_lmm(int level, void *lmm);
 
 /* 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 */
@@ -309,7 +304,7 @@ static inline void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars)
 extern struct lu_device_type lov_device_type;
 
 /* pools */
-extern lustre_hash_ops_t pool_hash_operations;
+extern cfs_hash_ops_t pool_hash_operations;
 /* ost_pool methods */
 int lov_ost_pool_init(struct ost_pool *op, unsigned int count);
 int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count);
index 783daca..3634b4b 100644 (file)
@@ -148,16 +148,7 @@ static int lov_io_sub_init(const struct lu_env *env, struct lov_io *lio,
         sub->sub_io_initialized = 0;
         sub->sub_borrowed = 0;
 
-        /*
-         * First sub-io. Use ->lis_single_subio and current environment, to
-         * avoid dynamic allocation.
-         */
-        if (lio->lis_active_subios == 0) {
-                sub->sub_io = &lio->lis_single_subio;
-                lio->lis_single_subio_index = stripe;
-                sub->sub_env = cl_env_get(&sub->sub_refcheck);
-                LASSERT(sub->sub_env == env);
-        } else if (lio->lis_mem_frozen) {
+        if (lio->lis_mem_frozen) {
                 LASSERT(mutex_is_locked(&ld->ld_mutex));
                 sub->sub_io  = &ld->ld_emrg[stripe]->emrg_subio;
                 sub->sub_env = ld->ld_emrg[stripe]->emrg_env;
@@ -169,12 +160,23 @@ static int lov_io_sub_init(const struct lu_env *env, struct lov_io *lio,
                 cookie = cl_env_reenter();
                 sub->sub_env = cl_env_get(&sub->sub_refcheck);
                 cl_env_reexit(cookie);
-
-                OBD_ALLOC_PTR(sub->sub_io);
                 if (IS_ERR(sub->sub_env))
                         result = PTR_ERR(sub->sub_env);
-                else if (sub->sub_io == NULL)
-                        result = -ENOMEM;
+
+                if (result == 0) {
+                        /*
+                         * First sub-io. Use ->lis_single_subio to
+                         * avoid dynamic allocation.
+                         */
+                        if (lio->lis_active_subios == 0) {
+                                sub->sub_io = &lio->lis_single_subio;
+                                lio->lis_single_subio_index = stripe;
+                        } else {
+                                OBD_ALLOC_PTR(sub->sub_io);
+                                if (sub->sub_io == NULL)
+                                        result = -ENOMEM;
+                        }
+                }
         }
 
         if (result == 0) {
index bc6ab44..25e3d1b 100644 (file)
@@ -77,7 +77,7 @@ static struct lov_sublock_env *lov_sublock_env_get(const struct lu_env *env,
          * they are not initialized at all. As a temp fix, in this case,
          * we still borrow the parent's env to call sublock operations.
          */
-        if (!cl_object_same(io->ci_obj, parent->cll_descr.cld_obj)) {
+        if (!io || !cl_object_same(io->ci_obj, parent->cll_descr.cld_obj)) {
                 subenv->lse_env = env;
                 subenv->lse_io  = io;
                 subenv->lse_sub = NULL;
@@ -216,7 +216,8 @@ static int lov_sublock_lock(const struct lu_env *env,
                 LASSERT(cl_lock_is_mutexed(child));
                 sublock->lss_active = parent;
 
-                if (unlikely(child->cll_state == CLS_FREEING)) {
+                if (unlikely((child->cll_state == CLS_FREEING) ||
+                             (child->cll_flags & CLF_CANCELLED))) {
                         struct lov_lock_link *link;
                         /*
                          * we could race with lock deletion which temporarily
@@ -345,6 +346,7 @@ static int lov_lock_sub_init(const struct lu_env *env,
                         descr->cld_end   = cl_index(descr->cld_obj, end);
                         descr->cld_mode  = parent->cll_descr.cld_mode;
                         descr->cld_gid   = parent->cll_descr.cld_gid;
+                        descr->cld_enq_flags   = parent->cll_descr.cld_enq_flags;
                         /* XXX has no effect */
                         lck->lls_sub[nr].sub_got = *descr;
                         lck->lls_sub[nr].sub_stripe = i;
@@ -366,6 +368,7 @@ static int lov_lock_sub_init(const struct lu_env *env,
                                 result = PTR_ERR(sublock);
                                 break;
                         }
+                        cl_lock_get_trust(sublock);
                         cl_lock_mutex_get(env, sublock);
                         cl_lock_mutex_get(env, parent);
                         /*
@@ -383,6 +386,7 @@ static int lov_lock_sub_init(const struct lu_env *env,
                                                "lov-parent", parent);
                         }
                         cl_lock_mutex_put(env, sublock);
+                        cl_lock_put(env, sublock);
                 }
         }
         /*
@@ -488,6 +492,52 @@ static void lov_lock_fini(const struct lu_env *env,
 }
 
 /**
+ *
+ * \retval 0 if state-transition can proceed
+ * \retval -ve otherwise.
+ */
+static int lov_lock_enqueue_wait(const struct lu_env *env,
+                                 struct lov_lock *lck,
+                                 struct cl_lock *sublock)
+{
+        struct cl_lock *lock     = lck->lls_cl.cls_lock;
+        struct cl_lock *conflict = sublock->cll_conflict;
+        int result = CLO_REPEAT;
+        ENTRY;
+
+        LASSERT(cl_lock_is_mutexed(lock));
+        LASSERT(cl_lock_is_mutexed(sublock));
+        LASSERT(sublock->cll_state == CLS_QUEUING);
+        LASSERT(conflict != NULL);
+
+        sublock->cll_conflict = NULL;
+        cl_lock_mutex_put(env, lock);
+        cl_lock_mutex_put(env, sublock);
+
+        LASSERT(cl_lock_nr_mutexed(env) == 0);
+
+        cl_lock_mutex_get(env, conflict);
+        cl_lock_cancel(env, conflict);
+        cl_lock_delete(env, conflict);
+        while (conflict->cll_state != CLS_FREEING) {
+                int rc = 0;
+
+                rc = cl_lock_state_wait(env, conflict);
+                if (rc == 0)
+                        continue;
+
+                result = lov_subresult(result, rc);
+                break;
+        }
+        cl_lock_mutex_put(env, conflict);
+        lu_ref_del(&conflict->cll_reference, "cancel-wait", sublock);
+        cl_lock_put(env, conflict);
+
+        cl_lock_mutex_get(env, lock);
+        RETURN(result);
+}
+
+/**
  * Tries to advance a state machine of a given sub-lock toward enqueuing of
  * the top-lock.
  *
@@ -536,10 +586,11 @@ static int lov_sublock_fill(const struct lu_env *env, struct cl_lock *parent,
         cl_lock_mutex_get(env, parent);
 
         if (!IS_ERR(sublock)) {
+                cl_lock_get_trust(sublock);
                 if (parent->cll_state == CLS_QUEUING &&
-                    lck->lls_sub[idx].sub_lock == NULL)
+                    lck->lls_sub[idx].sub_lock == NULL) {
                         lov_sublock_adopt(env, lck, sublock, idx, link);
-                else {
+                else {
                         OBD_SLAB_FREE_PTR(link, lov_lock_link_kmem);
                         /* other thread allocated sub-lock, or enqueue is no
                          * longer going on */
@@ -548,6 +599,7 @@ static int lov_sublock_fill(const struct lu_env *env, struct cl_lock *parent,
                         cl_lock_mutex_get(env, parent);
                 }
                 cl_lock_mutex_put(env, sublock);
+                cl_lock_put(env, sublock);
                 result = CLO_REPEAT;
         } else
                 result = PTR_ERR(sublock);
@@ -611,13 +663,30 @@ static int lov_lock_enqueue(const struct lu_env *env,
                                                   subenv->lse_io, enqflags,
                                                   i == lck->lls_nr - 1);
                         minstate = min(minstate, sublock->cll_state);
-                        /*
-                         * Don't hold a sub-lock in CLS_CACHED state, see
-                         * description for lov_lock::lls_sub.
-                         */
-                        if (sublock->cll_state > CLS_HELD)
-                                rc = lov_sublock_release(env, lck, i, 1, rc);
-                        lov_sublock_unlock(env, sub, closure, subenv);
+                        if (rc == CLO_WAIT) {
+                                switch (sublock->cll_state) {
+                                case CLS_QUEUING:
+                                        /* take recursive mutex, the lock is
+                                         * released in lov_lock_enqueue_wait.
+                                         */
+                                        cl_lock_mutex_get(env, sublock);
+                                        lov_sublock_unlock(env, sub, closure,
+                                                           subenv);
+                                        rc = lov_lock_enqueue_wait(env, lck,
+                                                                   sublock);
+                                        break;
+                                case CLS_CACHED:
+                                        rc = lov_sublock_release(env, lck, i,
+                                                                 1, rc);
+                                default:
+                                        lov_sublock_unlock(env, sub, closure,
+                                                           subenv);
+                                        break;
+                                }
+                        } else {
+                                LASSERT(sublock->cll_conflict == NULL);
+                                lov_sublock_unlock(env, sub, closure, subenv);
+                        }
                 }
                 result = lov_subresult(result, rc);
                 if (result != 0)
@@ -659,15 +728,11 @@ static int lov_lock_unuse(const struct lu_env *env,
                         if (lls->sub_flags & LSF_HELD) {
                                 LASSERT(sublock->cll_state == CLS_HELD);
                                 rc = cl_unuse_try(subenv->lse_env, sublock);
-                                if (rc != CLO_WAIT)
-                                        rc = lov_sublock_release(env, lck,
-                                                                 i, 0, rc);
+                                rc = lov_sublock_release(env, lck, i, 0, rc);
                         }
                         lov_sublock_unlock(env, sub, closure, subenv);
                 }
                 result = lov_subresult(result, rc);
-                if (result < 0)
-                        break;
         }
 
         if (result == 0 && lck->lls_cancel_race) {
@@ -678,6 +743,75 @@ static int lov_lock_unuse(const struct lu_env *env,
         RETURN(result);
 }
 
+
+static void lov_lock_cancel(const struct lu_env *env,
+                           const struct cl_lock_slice *slice)
+{
+        struct lov_lock        *lck     = cl2lov_lock(slice);
+        struct cl_lock_closure *closure = lov_closure_get(env, slice->cls_lock);
+        int i;
+        int result;
+
+        ENTRY;
+
+        for (result = 0, i = 0; i < lck->lls_nr; ++i) {
+                int rc;
+                struct lovsub_lock     *sub;
+                struct cl_lock         *sublock;
+                struct lov_lock_sub    *lls;
+                struct lov_sublock_env *subenv;
+
+                /* top-lock state cannot change concurrently, because single
+                 * thread (one that released the last hold) carries unlocking
+                 * to the completion. */
+                lls = &lck->lls_sub[i];
+                sub = lls->sub_lock;
+                if (sub == NULL)
+                        continue;
+
+                sublock = sub->lss_cl.cls_lock;
+                rc = lov_sublock_lock(env, lck, lls, closure, &subenv);
+                if (rc == 0) {
+                        if (!(lls->sub_flags & LSF_HELD)) {
+                                lov_sublock_unlock(env, sub, closure, subenv);
+                                continue;
+                        }
+
+                        switch(sublock->cll_state) {
+                        case CLS_HELD:
+                                rc = cl_unuse_try(subenv->lse_env,
+                                                  sublock);
+                                lov_sublock_release(env, lck, i, 0, 0);
+                                break;
+                        case CLS_ENQUEUED:
+                                /* TODO: it's not a good idea to cancel this
+                                 * lock because it's innocent. But it's
+                                 * acceptable. The better way would be to
+                                 * define a new lock method to unhold the
+                                 * dlm lock. */
+                                cl_lock_cancel(env, sublock);
+                        default:
+                                lov_sublock_release(env, lck, i, 1, 0);
+                                break;
+                        }
+                        lov_sublock_unlock(env, sub, closure, subenv);
+                }
+
+                if (rc == CLO_REPEAT) {
+                        --i;
+                        continue;
+                }
+
+                result = lov_subresult(result, rc);
+        }
+
+        if (result)
+                CL_LOCK_DEBUG(D_ERROR, env, slice->cls_lock,
+                              "lov_lock_cancel fails with %d.\n", result);
+
+        cl_lock_closure_fini(closure);
+}
+
 static int lov_lock_wait(const struct lu_env *env,
                          const struct cl_lock_slice *slice)
 {
@@ -1049,6 +1183,7 @@ static const struct cl_lock_operations lov_lock_ops = {
         .clo_wait      = lov_lock_wait,
         .clo_use       = lov_lock_use,
         .clo_unuse     = lov_lock_unuse,
+        .clo_cancel    = lov_lock_cancel,
         .clo_fits_into = lov_lock_fits_into,
         .clo_delete    = lov_lock_delete,
         .clo_print     = lov_lock_print
index ec0eb36..f8bdec2 100644 (file)
@@ -803,10 +803,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
                 RETURN(-ENOMEM);
         cfs_waitq_init(&lov->lov_qos.lq_statfs_waitq);
 
-        lov->lov_pools_hash_body = lustre_hash_init("POOLS",
-                                                    HASH_POOLS_CUR_BITS,
-                                                    HASH_POOLS_MAX_BITS,
-                                                    &pool_hash_operations, 0);
+        lov->lov_pools_hash_body = cfs_hash_create("POOLS", HASH_POOLS_CUR_BITS,
+                                                   HASH_POOLS_CUR_BITS,
+                                                   &pool_hash_operations, 0);
         CFS_INIT_LIST_HEAD(&lov->lov_pool_list);
         lov->lov_pool_count = 0;
         rc = lov_ost_pool_init(&lov->lov_packed, 0);
@@ -876,7 +875,7 @@ static int lov_cleanup(struct obd_device *obd)
                 CDEBUG(D_INFO, "delete pool %p\n", pool);
                 lov_pool_del(obd, pool->pool_name);
         }
-        lustre_hash_exit(lov->lov_pools_hash_body);
+        cfs_hash_destroy(lov->lov_pools_hash_body);
         lov_ost_pool_free(&(lov->lov_qos.lq_rr.lqr_pool));
         lov_ost_pool_free(&lov->lov_packed);
 
@@ -1161,9 +1160,8 @@ out:
 do {                                                                            \
         LASSERT((lsmp) != NULL);                                                \
         LASSERTF(((lsmp)->lsm_magic == LOV_MAGIC_V1 ||                          \
-                 (lsmp)->lsm_magic == LOV_MAGIC_V3 ||                           \
-                 (lsmp)->lsm_magic == LOV_MAGIC_JOIN), "%p->lsm_magic=%x\n",    \
-                 (lsmp), (lsmp)->lsm_magic);                                    \
+                 (lsmp)->lsm_magic == LOV_MAGIC_V3),                            \
+                 "%p->lsm_magic=%x\n", (lsmp), (lsmp)->lsm_magic);              \
 } while (0)
 
 static int lov_destroy(struct obd_export *exp, struct obdo *oa,
@@ -2659,21 +2657,6 @@ static int lov_set_info_async(struct obd_export *exp, obd_count keylen,
         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)
 {
         int i, rc = 0;
@@ -2744,7 +2727,6 @@ struct obd_ops lov_obd_ops = {
         .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,
index 5e23076..ebfd376 100644 (file)
@@ -57,7 +57,6 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,
         unsigned long ssize = lsm->lsm_stripe_size;
         unsigned long stripe_size;
         obd_off swidth;
-        int sindex = stripeno;
         obd_size lov_size;
         int magic = lsm->lsm_magic;
         ENTRY;
@@ -75,7 +74,6 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_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);
 }
 
@@ -131,7 +129,6 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,
                       int stripeno, obd_off *obdoff)
 {
         unsigned long ssize  = lsm->lsm_stripe_size;
-        __u64 l_off, s_off;
         obd_off stripe_off, this_stripe, swidth;
         int magic = lsm->lsm_magic;
         int ret = 0;
@@ -142,23 +139,7 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,
         }
 
         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, obdoff = 0
-         *2) lov_off extent > stripeno extent, ret = 1, 
-         *   obdoff = 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;
-                *obdoff = 0;
-                return ret;
-        } else if (s_off > l_off) {
-                ret = 1;
-                *obdoff = 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);
        
@@ -279,7 +260,6 @@ int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off)
 {
         unsigned long ssize  = lsm->lsm_stripe_size;
         obd_off stripe_off, swidth;
-        obd_off offset = lov_off;
         int magic = lsm->lsm_magic;
 
         LASSERT(lsm_op_find(magic) != NULL);
@@ -290,6 +270,5 @@ int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off)
         /* Puts stripe_off/ssize result into stripe_off */
         do_div(stripe_off, ssize);
 
-        return (stripe_off +
-                lsm_op_find(magic)->lsm_stripe_index_by_offset(lsm, offset));
+        return stripe_off; 
 }
index 87b1707..0ed24bb 100644 (file)
@@ -92,13 +92,6 @@ void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm)
                              le32_to_cpu(lmm->lmm_stripe_count));
 }
 
-void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj)
-{
-        lov_dump_lmm_common(level, &lmmj->lmmj_md);
-        CDEBUG(level, "extent_count %u\n",
-               le32_to_cpu(lmmj->lmmj_extent_count));
-}
-
 void lov_dump_lmm_v3(int level, struct lov_mds_md_v3 *lmm)
 {
         lov_dump_lmm_common(level, lmm);
@@ -115,8 +108,6 @@ void lov_dump_lmm(int level, void *lmm)
         switch (magic) {
         case LOV_MAGIC_V1:
                 return lov_dump_lmm_v1(level, (struct lov_mds_md_v1 *)(lmm));
-        case LOV_MAGIC_JOIN:
-                return lov_dump_lmm_join(level, (struct lov_mds_md_join *)(lmm));
         case LOV_MAGIC_V3:
                 return lov_dump_lmm_v3(level, (struct lov_mds_md_v3 *)(lmm));
         default:
index 4609de2..2e293bb 100644 (file)
@@ -140,60 +140,73 @@ struct cl_page *lov_page_init_raid0(const struct lu_env *env,
                                     struct cl_object *obj, struct cl_page *page,
                                     cfs_page_t *vmpage)
 {
-        struct lov_page   *lpg;
         struct lov_object *loo = cl2lov(obj);
+        struct lov_io     *lio = lov_env_io(env);
         int result;
 
+        loff_t   offset;
+        int      stripe;
+        obd_off  suboff;
+        struct cl_page          *subpage;
+        struct cl_object        *subobj;
+        struct lov_layout_raid0 *r0 = lov_r0(loo);
+        struct lov_io_sub       *sub;
+
         ENTRY;
-        OBD_SLAB_ALLOC_PTR_GFP(lpg, lov_page_kmem, CFS_ALLOC_IO);
-        if (lpg != NULL) {
-                loff_t   offset;
-                int      stripe;
-                obd_off  suboff;
-                struct cl_page          *subpage;
-                struct cl_object        *subobj;
-                struct lov_layout_raid0 *r0 = lov_r0(loo);
-
-                offset = cl_offset(obj, page->cp_index);
-                stripe = lov_stripe_number(r0->lo_lsm, offset);
-                result = lov_stripe_offset(r0->lo_lsm, offset, stripe,
-                                           &suboff);
-                LASSERT(stripe < r0->lo_nr);
-                LASSERT(result == 0);
-
-                subobj  = lovsub2cl(r0->lo_sub[stripe]);
-                subpage = cl_page_find(env, subobj,
-                                       cl_index(subobj, suboff), vmpage,
-                                       page->cp_type);
-                if (!IS_ERR(subpage)) {
-                        if (subpage->cp_parent != NULL) {
-                                /*
-                                 * This is only possible when TRANSIENT page
-                                 * is being created, and CACHEABLE sub-page
-                                 * (attached to already existing top-page) has
-                                 * been found. Tell cl_page_find() to use
-                                 * existing page.
-                                 */
-                                LASSERT(subpage->cp_type == CPT_CACHEABLE);
-                                LASSERT(page->cp_type == CPT_TRANSIENT);
-                                lpg->lps_invalid = 1;
-                                cl_page_put(env, subpage);
-                                /*
-                                 * XXX This assumes that lov is in the topmost
-                                 * cl_page.
-                                 */
-                                result = PTR_ERR(cl_page_top(subpage));
-                        } else {
-                                lu_ref_add(&subpage->cp_reference, "lov", page);
-                                subpage->cp_parent = page;
-                                page->cp_child = subpage;
-                        }
-                        cl_page_slice_add(page, &lpg->lps_cl,
-                                          obj, &lov_page_ops);
-                } else
-                        result = PTR_ERR(subpage);
+
+        offset = cl_offset(obj, page->cp_index);
+        stripe = lov_stripe_number(r0->lo_lsm, offset);
+        LASSERT(stripe < r0->lo_nr);
+        result = lov_stripe_offset(r0->lo_lsm, offset, stripe,
+                                   &suboff);
+        LASSERT(result == 0);
+
+        subobj = lovsub2cl(r0->lo_sub[stripe]);
+        sub    = lov_sub_get(env, lio, stripe);
+        if (IS_ERR(sub))
+                GOTO(out, result = PTR_ERR(sub));
+
+        subpage = cl_page_find(sub->sub_env, subobj,
+                               cl_index(subobj, suboff), vmpage,
+                               page->cp_type);
+        lov_sub_put(sub);
+        if (!IS_ERR(subpage)) {
+                struct lov_page *lpg;
+
+                OBD_SLAB_ALLOC_PTR_GFP(lpg, lov_page_kmem, CFS_ALLOC_IO);
+                if (lpg == NULL) {
+                        cl_page_put(env, subpage);
+                        GOTO(out, result = -ENOMEM);
+                }
+
+                if (subpage->cp_parent != NULL) {
+                        /*
+                         * This is only possible when TRANSIENT page
+                         * is being created, and CACHEABLE sub-page
+                         * (attached to already existing top-page) has
+                         * been found. Tell cl_page_find() to use
+                         * existing page.
+                         */
+                        LASSERT(subpage->cp_type == CPT_CACHEABLE);
+                        LASSERT(page->cp_type == CPT_TRANSIENT);
+                        lpg->lps_invalid = 1;
+                        cl_page_put(env, subpage);
+                        /*
+                         * XXX This assumes that lov is in the topmost
+                         * cl_page.
+                         */
+                        result = PTR_ERR(cl_page_top(subpage));
+                } else {
+                        lu_ref_add(&subpage->cp_reference, "lov", page);
+                        subpage->cp_parent = page;
+                        page->cp_child = subpage;
+                }
+                cl_page_slice_add(page, &lpg->lps_cl,
+                                  obj, &lov_page_ops);
         } else
-                result = -ENOMEM;
+                result = PTR_ERR(subpage);
+
+out:
         RETURN(ERR_PTR(result));
 }
 
index fd41f84..208ec04 100644 (file)
@@ -81,7 +81,7 @@ void lov_pool_putref(struct pool_desc *pool)
  * Chapter 6.4.
  * Addison Wesley, 1973
  */
-static __u32 pool_hashfn(lustre_hash_t *hash_body, void *key, unsigned mask)
+static __u32 pool_hashfn(cfs_hash_t *hash_body, void *key, unsigned mask)
 {
         int i;
         __u32 result;
@@ -135,12 +135,12 @@ static void *pool_hashrefcount_put(struct hlist_node *hnode)
         return (pool);
 }
 
-lustre_hash_ops_t pool_hash_operations = {
-        .lh_hash        = pool_hashfn,
-        .lh_key         = pool_key,
-        .lh_compare     = pool_hashkey_compare,
-        .lh_get         = pool_hashrefcount_get,
-        .lh_put         = pool_hashrefcount_put,
+cfs_hash_ops_t pool_hash_operations = {
+        .hs_hash        = pool_hashfn,
+        .hs_key         = pool_key,
+        .hs_compare     = pool_hashkey_compare,
+        .hs_get         = pool_hashrefcount_get,
+        .hs_put         = pool_hashrefcount_put,
 };
 
 #ifdef LPROCFS
@@ -475,8 +475,8 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
         spin_unlock(&obd->obd_dev_lock);
 
         /* add to find only when it fully ready  */
-        rc = lustre_hash_add_unique(lov->lov_pools_hash_body, poolname,
-                                    &new_pool->pool_hash);
+        rc = cfs_hash_add_unique(lov->lov_pools_hash_body, poolname,
+                                 &new_pool->pool_hash);
         if (rc)
                 GOTO(out_err, rc = -EEXIST);
 
@@ -509,7 +509,7 @@ int lov_pool_del(struct obd_device *obd, char *poolname)
         lov = &(obd->u.lov);
 
         /* lookup and kill hash reference */
-        pool = lustre_hash_del_key(lov->lov_pools_hash_body, poolname);
+        pool = cfs_hash_del_key(lov->lov_pools_hash_body, poolname);
         if (pool == NULL)
                 RETURN(-ENOENT);
 
@@ -542,7 +542,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)
 
         lov = &(obd->u.lov);
 
-        pool = lustre_hash_lookup(lov->lov_pools_hash_body, poolname);
+        pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
         if (pool == NULL)
                 RETURN(-ENOENT);
 
@@ -589,7 +589,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
 
         lov = &(obd->u.lov);
 
-        pool = lustre_hash_lookup(lov->lov_pools_hash_body, poolname);
+        pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
         if (pool == NULL)
                 RETURN(-ENOENT);
 
@@ -656,7 +656,7 @@ struct pool_desc *lov_find_pool(struct lov_obd *lov, char *poolname)
 
         pool = NULL;
         if (poolname[0] != '\0') {
-                pool = lustre_hash_lookup(lov->lov_pools_hash_body, poolname);
+                pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname);
                 if (pool == NULL)
                         CWARN("Request for an unknown pool ("LOV_POOLNAMEF")\n",
                               poolname);
index e4ff065..663547a 100644 (file)
@@ -88,40 +88,6 @@ static void lovsub_parent_unlock(const struct lu_env *env, struct lov_lock *lov)
         EXIT;
 }
 
-static int lovsub_lock_state_one(const struct lu_env *env,
-                                 const struct lovsub_lock *lovsub,
-                                 struct lov_lock *lov)
-{
-        struct cl_lock *parent;
-        struct cl_lock *child;
-        int             restart = 0;
-
-        ENTRY;
-        parent = lov->lls_cl.cls_lock;
-        child  = lovsub->lss_cl.cls_lock;
-
-        if (lovsub->lss_active != parent) {
-                lovsub_parent_lock(env, lov);
-                if (child->cll_error != 0 && parent->cll_error == 0) {
-                        /*
-                         * This is a deadlock case:
-                         * cl_lock_error(for the parent lock)
-                         *   -> cl_lock_delete
-                         *     -> lov_lock_delete
-                         *       -> cl_lock_enclosure
-                         *         -> cl_lock_mutex_try(for the child lock)
-                         */
-                        cl_lock_mutex_put(env, child);
-                        cl_lock_error(env, parent, child->cll_error);
-                        restart = 1;
-                } else {
-                        cl_lock_signal(env, parent);
-                }
-                lovsub_parent_unlock(env, lov);
-        }
-        RETURN(restart);
-}
-
 /**
  * Implements cl_lock_operations::clo_state() method for lovsub layer, which
  * method is called whenever sub-lock state changes. Propagates state change
@@ -133,22 +99,20 @@ static void lovsub_lock_state(const struct lu_env *env,
 {
         struct lovsub_lock   *sub = cl2lovsub_lock(slice);
         struct lov_lock_link *scan;
-        int                   restart = 0;
 
         LASSERT(cl_lock_is_mutexed(slice->cls_lock));
         ENTRY;
 
-        do {
-                restart = 0;
-                list_for_each_entry(scan, &sub->lss_parents, lll_list) {
-                        restart = lovsub_lock_state_one(env, sub,
-                                                        scan->lll_super);
-                        if (restart) {
-                                cl_lock_mutex_get(env, slice->cls_lock);
-                                break;
-                        }
+        list_for_each_entry(scan, &sub->lss_parents, lll_list) {
+                struct lov_lock *lov    = scan->lll_super;
+                struct cl_lock  *parent = lov->lls_cl.cls_lock;
+
+                if (sub->lss_active != parent) {
+                        lovsub_parent_lock(env, lov);
+                        cl_lock_signal(env, parent);
+                        lovsub_parent_unlock(env, lov);
                 }
-        } while(restart);
+        }
         EXIT;
 }
 
@@ -203,9 +167,6 @@ static void lovsub_lock_descr_map(const struct cl_lock_descr *in,
         start = in->cld_start;
         end   = in->cld_end;
 
-        /*
-         * XXX join file support.
-         */
         if (lsm->lsm_stripe_count > 1) {
                 size = cl_index(lov2cl(obj), lsm->lsm_stripe_size);
                 skip = (lsm->lsm_stripe_count - 1) * size;
@@ -330,13 +291,15 @@ static int lovsub_lock_closure(const struct lu_env *env,
 static int lovsub_lock_delete_one(const struct lu_env *env,
                                   struct cl_lock *child, struct lov_lock *lov)
 {
-        struct cl_lock       *parent;
+        struct cl_lock *parent;
         int             result;
         ENTRY;
 
-        parent  = lov->lls_cl.cls_lock;
-        result = 0;
+        parent = lov->lls_cl.cls_lock;
+        if (parent->cll_error)
+                RETURN(0);
 
+        result = 0;
         switch (parent->cll_state) {
         case CLS_NEW:
         case CLS_QUEUING:
@@ -414,9 +377,11 @@ static int lovsub_lock_delete_one(const struct lu_env *env,
                 }
                 break;
         case CLS_HELD:
+                CL_LOCK_DEBUG(D_ERROR, env, parent, "Delete CLS_HELD lock\n");
         default:
                 CERROR("Impossible state: %i\n", parent->cll_state);
                 LBUG();
+                break;
         }
 
         RETURN(result);
index 5230bd9..58b88d5 100644 (file)
@@ -303,19 +303,6 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private,
                 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();
         }
index 4489340..ac709b0 100644 (file)
@@ -69,8 +69,6 @@ void mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
 void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
                    __u32 mode, __u64 rdev, __u32 flags, const void *data,
                    int datalen);
-void mdc_join_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
-                   __u64 head_size);
 void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
index aea8c87..3ba6799 100644 (file)
@@ -181,8 +181,6 @@ static __u32 mds_pack_open_flags(__u32 flags, __u32 mode)
                 cr_flags |= MDS_OPEN_SYNC;
         if (flags & O_DIRECTORY)
                 cr_flags |= MDS_OPEN_DIRECTORY;
-        if (mode  & M_JOIN_FILE)
-                cr_flags |= MDS_OPEN_JOIN_FILE;
 #ifdef FMODE_EXEC
         if (flags & FMODE_EXEC)
                 cr_flags |= MDS_FMODE_EXEC;
@@ -194,18 +192,6 @@ static __u32 mds_pack_open_flags(__u32 flags, __u32 mode)
 }
 
 /* packing of MDS records */
-void mdc_join_pack(struct ptlrpc_request *req,
-                   struct md_op_data *op_data,
-                   __u64 head_size)
-{
-        struct mdt_rec_join *rec;
-
-        rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_JOINFILE);
-        LASSERT(rec != NULL);
-        rec->jr_fid = op_data->op_fid2;
-        rec->jr_headsize = head_size;
-}
-
 void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
                    __u32 mode, __u64 rdev, __u32 flags, const void *lmm,
                    int lmmlen)
index e7d8b7c..4fb239f 100644 (file)
@@ -248,8 +248,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
         struct ptlrpc_request *req;
         struct obd_device     *obddev = class_exp2obd(exp);
         struct ldlm_intent    *lit;
-        int           joinfile = !!((it->it_create_mode & M_JOIN_FILE) &&
-                                    op_data->op_data);
         CFS_LIST_HEAD(cancels);
         int                    count = 0;
         int                    mode;
@@ -274,8 +272,8 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
                                                 MDS_INODELOCK_OPEN);
         }
 
-        /* If CREATE or JOIN_FILE, cancel parent's UPDATE lock. */
-        if (it->it_op & IT_CREAT || joinfile)
+        /* If CREATE, cancel parent's UPDATE lock. */
+        if (it->it_op & IT_CREAT)
                 mode = LCK_EX;
         else
                 mode = LCK_CR;
@@ -300,10 +298,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
                              op_data->op_namelen + 1);
         req_capsule_set_size(&req->rq_pill, &RMF_EADATA, RCL_CLIENT,
                              max(lmmsize, obddev->u.cli.cl_default_mds_easize));
-        if (!joinfile) {
-                req_capsule_set_size(&req->rq_pill, &RMF_REC_JOINFILE,
-                                     RCL_CLIENT, 0);
-        }
 
         rc = ldlm_prep_enqueue_req(exp, req, &cancels, count);
         if (rc) {
@@ -311,11 +305,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
                 return NULL;
         }
 
-        if (joinfile) {
-                __u64 head_size = *(__u64 *)op_data->op_data;
-                mdc_join_pack(req, op_data, head_size);
-        }
-
         spin_lock(&req->rq_lock);
         req->rq_replay = req->rq_import->imp_replayable;
         spin_unlock(&req->rq_lock);
@@ -644,17 +633,11 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
                 policy = *(ldlm_policy_data_t *)lmm;
                 res_id.name[3] = LDLM_FLOCK;
         } else if (it->it_op & IT_OPEN) {
-                int joinfile = !!((it->it_create_mode & M_JOIN_FILE) &&
-                                              op_data->op_data);
-
                 req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize,
                                            einfo->ei_cbdata);
-                if (!joinfile) {
-                        policy.l_inodebits.bits = MDS_INODELOCK_UPDATE;
-                        einfo->ei_cbdata = NULL;
-                        lmm = NULL;
-                } else
-                        it->it_create_mode &= ~M_JOIN_FILE;
+                policy.l_inodebits.bits = MDS_INODELOCK_UPDATE;
+                einfo->ei_cbdata = NULL;
+                lmm = NULL;
         } else if (it->it_op & IT_UNLINK)
                 req = mdc_intent_unlink_pack(exp, it, op_data);
         else if (it->it_op & (IT_GETATTR | IT_LOOKUP))
@@ -678,7 +661,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
                 mdc_enter_request(&obddev->u.cli);
         }
         rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, &policy, &flags, NULL,
-                              0, NULL, lockh, 0);
+                              0, lockh, 0);
         if (reqp)
                 *reqp = req;
 
@@ -960,7 +943,7 @@ static int mdc_intent_getattr_async_interpret(const struct lu_env *env,
                 rc = -ETIMEDOUT;
 
         rc = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, 1, einfo->ei_mode,
-                                   &flags, NULL, 0, NULL, lockh, rc);
+                                   &flags, NULL, 0, lockh, rc);
         if (rc < 0) {
                 CERROR("ldlm_cli_enqueue_fini: %d\n", rc);
                 mdc_clear_replay_flag(req, rc);
@@ -1007,7 +990,7 @@ int mdc_intent_getattr_async(struct obd_export *exp,
 
         mdc_enter_request(&obddev->u.cli);
         rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, &policy, &flags, NULL,
-                              0, NULL, &minfo->mi_lockh, 1);
+                              0, &minfo->mi_lockh, 1);
         if (rc < 0) {
                 mdc_exit_request(&obddev->u.cli);
                 RETURN(rc);
index fa4c7c7..770d771 100644 (file)
@@ -1270,6 +1270,25 @@ struct md_capainfo *md_capainfo(const struct lu_env *env)
 }
 EXPORT_SYMBOL(md_capainfo);
 
+/*
+ * context key constructor/destructor:
+ * mdd_quota_key_init, mdd_quota_key_fini
+ */
+LU_KEY_INIT_FINI(mdd_quota, struct md_quota);
+
+struct lu_context_key mdd_quota_key = {
+        .lct_tags = LCT_SESSION,
+        .lct_init = mdd_quota_key_init,
+        .lct_fini = mdd_quota_key_fini
+};
+
+struct md_quota *md_quota(const struct lu_env *env)
+{
+        LASSERT(env->le_ses != NULL);
+        return lu_context_key_get(env->le_ses, &mdd_quota_key);
+}
+EXPORT_SYMBOL(md_quota);
+
 static int mdd_changelog_user_register(struct mdd_device *mdd, int *id)
 {
         struct llog_ctxt *ctxt;
@@ -1491,7 +1510,8 @@ static int mdd_iocontrol(const struct lu_env *env, struct md_device *m,
 }
 
 /* type constructor/destructor: mdd_type_init, mdd_type_fini */
-LU_TYPE_INIT_FINI(mdd, &mdd_thread_key, &mdd_ucred_key, &mdd_capainfo_key);
+LU_TYPE_INIT_FINI(mdd, &mdd_thread_key, &mdd_ucred_key, &mdd_capainfo_key,
+                  &mdd_quota_key);
 
 const struct md_device_operations mdd_ops = {
         .mdo_statfs         = mdd_statfs,
index 4e8224c..d0232e2 100644 (file)
@@ -756,6 +756,7 @@ static int mdd_link(const struct lu_env *env, struct md_object *tgt_obj,
         struct thandle *handle;
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qids[MAXQUOTAS] = { 0, 0 };
         int quota_opc = 0, rec_pending[MAXQUOTAS] = { 0, 0 };
@@ -774,7 +775,7 @@ static int mdd_link(const struct lu_env *env, struct md_object *tgt_obj,
                         quota_opc = FSFILT_OP_LINK;
                         mdd_quota_wrapper(la_tmp, qids);
                         /* get block quota for parent */
-                        lquota_chkquota(mds_quota_interface_ref, obd,
+                        lquota_chkquota(mds_quota_interface_ref, obd, exp,
                                         qids, rec_pending, 1, NULL,
                                         LQUOTA_FLAGS_BLK, data, 1);
                 }
@@ -870,9 +871,6 @@ int mdd_declare_finish_unlink(const struct lu_env *env,
         rc = obd_unpackmd(mds->mds_osc_exp, &lsm, ma->ma_lmm, ma->ma_lmm_size);
         if (rc < 0)
                 RETURN(rc);
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                GOTO(out, rc);
 
         ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
         rc = llog_declare_add_2(ctxt, NULL, lsm, th);
@@ -1157,7 +1155,8 @@ static int mdd_name_insert(const struct lu_env *env,
         int is_dir = S_ISDIR(ma->ma_attr.la_mode);
 #ifdef HAVE_QUOTA_SUPPORT
         struct md_ucred *uc = md_ucred(env);
-        struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_device *obd = mdo2mdd(pobj)->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qids[MAXQUOTAS] = { 0, 0 };
         int quota_opc = 0, rec_pending[MAXQUOTAS] = { 0, 0 };
@@ -1179,7 +1178,7 @@ static int mdd_name_insert(const struct lu_env *env,
                                 mdd_quota_wrapper(la_tmp, qids);
                                 /* get block quota for parent */
                                 lquota_chkquota(mds_quota_interface_ref, obd,
-                                                qids, rec_pending, 1, NULL,
+                                                exp, qids, rec_pending, 1, NULL,
                                                 LQUOTA_FLAGS_BLK, data, 1);
                         }
                 } else {
@@ -1450,6 +1449,7 @@ static int mdd_rename_tgt(const struct lu_env *env,
         struct thandle *handle;
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qcids[MAXQUOTAS] = { 0, 0 };
         unsigned int qpids[MAXQUOTAS] = { 0, 0 };
@@ -1470,7 +1470,7 @@ static int mdd_rename_tgt(const struct lu_env *env,
                         quota_popc = FSFILT_OP_LINK;
                         mdd_quota_wrapper(la_tmp, qpids);
                         /* get block quota for target parent */
-                        lquota_chkquota(mds_quota_interface_ref, obd,
+                        lquota_chkquota(mds_quota_interface_ref, obd, exp,
                                         qpids, rec_pending, 1, NULL,
                                         LQUOTA_FLAGS_BLK, data, 1);
                 }
@@ -1939,6 +1939,7 @@ static int mdd_create(const struct lu_env *env,
         int got_def_acl = 0;
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qcids[MAXQUOTAS] = { 0, 0 };
         unsigned int qpids[MAXQUOTAS] = { 0, 0 };
@@ -2002,8 +2003,9 @@ static int mdd_create(const struct lu_env *env,
                         mdd_quota_wrapper(&ma->ma_attr, qcids);
                         mdd_quota_wrapper(la_tmp, qpids);
                         /* get file quota for child */
-                        lquota_chkquota(mds_quota_interface_ref, obd, qcids,
-                                        inode_pending, 1, NULL, 0, NULL, 0);
+                        lquota_chkquota(mds_quota_interface_ref, obd, exp,
+                                        qcids, inode_pending, 1, NULL, 0, NULL,
+                                        0);
                         switch (ma->ma_attr.la_mode & S_IFMT) {
                         case S_IFLNK:
                         case S_IFDIR:
@@ -2021,13 +2023,14 @@ static int mdd_create(const struct lu_env *env,
                         /* get block quota for child and parent */
                         if (block_count)
                                 lquota_chkquota(mds_quota_interface_ref, obd,
-                                                qcids, block_pending,
+                                                exp, qcids, block_pending,
                                                 block_count, NULL,
                                                 LQUOTA_FLAGS_BLK, NULL, 0);
                         if (!same)
                                 lquota_chkquota(mds_quota_interface_ref, obd,
-                                                qpids, parent_pending, 1, NULL,
-                                                LQUOTA_FLAGS_BLK, NULL, 0);
+                                                exp, qpids, parent_pending, 1,
+                                                NULL, LQUOTA_FLAGS_BLK, NULL,
+                                                0);
                 }
         }
 #endif
@@ -2394,6 +2397,7 @@ static int mdd_rename(const struct lu_env *env,
 
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qspids[MAXQUOTAS] = { 0, 0 };
         unsigned int qtcids[MAXQUOTAS] = { 0, 0 };
@@ -2427,7 +2431,7 @@ static int mdd_rename(const struct lu_env *env,
                                         mdd_quota_wrapper(la_tmp, qtpids);
                                         /* get block quota for target parent */
                                         lquota_chkquota(mds_quota_interface_ref,
-                                                        obd, qtpids,
+                                                        obd, exp, qtpids,
                                                         rec_pending, 1, NULL,
                                                         LQUOTA_FLAGS_BLK,
                                                         data, 1);
index f0995d8..4ddd1cc 100644 (file)
@@ -400,7 +400,7 @@ int mdd_quota_setup(const struct lu_env *env, struct md_device *m,
 int mdd_quota_cleanup(const struct lu_env *env, struct md_device *m);
 int mdd_quota_recovery(const struct lu_env *env, struct md_device *m);
 int mdd_quota_check(const struct lu_env *env, struct md_device *m,
-                    struct obd_export *exp, __u32 type);
+                    __u32 type);
 int mdd_quota_on(const struct lu_env *env, struct md_device *m,
                  __u32 type);
 int mdd_quota_off(const struct lu_env *env, struct md_device *m,
index 960419d..539bb26 100644 (file)
@@ -709,10 +709,6 @@ int mdd_declare_setattr_log(const struct lu_env *env, struct mdd_object *obj,
         if (rc < 0)
                 RETURN(rc);
 
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                GOTO(out, rc);
-
         /* declare write setattr log */
         ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
         rc = llog_declare_add_2(ctxt, NULL, lsm, th);
@@ -742,10 +738,6 @@ int mdd_log_op_setattr(const struct lu_env *env, struct obd_device *obd,
         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);
@@ -817,12 +809,6 @@ static int mdd_osc_setattr_async(struct obd_device *obd, __u32 uid, __u32 gid,
                 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 */
         oinfo.oi_oa->o_uid = uid;
         oinfo.oi_oa->o_gid = gid;
index 6720c8f..d879ef5 100644 (file)
@@ -685,6 +685,55 @@ static int __mdd_lmv_get(const struct lu_env *env,
         RETURN(rc);
 }
 
+static int __mdd_lma_get(const struct lu_env *env, struct mdd_object *mdd_obj,
+                         struct md_attr *ma)
+{
+        struct mdd_thread_info *info = mdd_env_info(env);
+        struct lustre_mdt_attrs *lma =
+                                 (struct lustre_mdt_attrs *)info->mti_xattr_buf;
+        int lma_size;
+        int rc;
+        ENTRY;
+
+        /* If all needed data are already valid, nothing to do */
+        if ((ma->ma_valid & (MA_HSM | MA_SOM)) ==
+            (ma->ma_need & (MA_HSM | MA_SOM)))
+                RETURN(0);
+
+        /* Read LMA from disk EA */
+        lma_size = sizeof(info->mti_xattr_buf);
+        rc = mdd_get_md(env, mdd_obj, lma, &lma_size, XATTR_NAME_LMA);
+        if (rc <= 0)
+                RETURN(rc);
+
+        /* Useless to check LMA incompatibility because this is already done in
+         * osd_ea_fid_get(), and this will fail long before this code is
+         * called.
+         * So, if we are here, LMA is compatible.
+         */
+
+        lustre_lma_swab(lma);
+
+        /* Swab and copy LMA */
+        if (ma->ma_need & MA_HSM) {
+                if (lma->lma_compat & LMAC_HSM)
+                        ma->ma_hsm_flags = lma->lma_flags & HSM_FLAGS_MASK;
+                else
+                        ma->ma_hsm_flags = 0;
+                ma->ma_valid |= MA_HSM;
+        }
+        if (ma->ma_need & MA_SOM) {
+
+                /* XXX: Here, copy and swab SoM data, and then remove this
+                 * assert. */
+                LASSERT(!(ma->ma_need & MA_SOM));
+
+                ma->ma_valid |= MA_SOM;
+        }
+
+        RETURN(0);
+}
+
 static int mdd_attr_get_internal(const struct lu_env *env,
                                  struct mdd_object *mdd_obj,
                                  struct md_attr *ma)
@@ -704,6 +753,10 @@ static int mdd_attr_get_internal(const struct lu_env *env,
                 if (S_ISDIR(mdd_object_type(mdd_obj)))
                         rc = __mdd_lmv_get(env, mdd_obj, ma);
         }
+        if (rc == 0 && ma->ma_need & (MA_HSM | MA_SOM)) {
+                if (S_ISREG(mdd_object_type(mdd_obj)))
+                        rc = __mdd_lma_get(env, mdd_obj, ma);
+        }
 #ifdef CONFIG_FS_POSIX_ACL
         if (rc == 0 && ma->ma_need & MA_ACL_DEF) {
                 if (S_ISDIR(mdd_object_type(mdd_obj)))
@@ -719,7 +772,8 @@ int mdd_attr_get_internal_locked(const struct lu_env *env,
                                  struct mdd_object *mdd_obj, struct md_attr *ma)
 {
         int rc;
-        int needlock = ma->ma_need & (MA_LOV | MA_LMV | MA_ACL_DEF);
+        int needlock = ma->ma_need &
+                       (MA_LOV | MA_LMV | MA_ACL_DEF | MA_HSM | MA_SOM);
 
         if (needlock)
                 mdd_read_lock(env, mdd_obj, MOR_TGT_CHILD);
@@ -1257,6 +1311,76 @@ out:
         RETURN(handle);
 }
 
+/**
+ * Should be called with write lock held.
+ *
+ * \see mdd_lma_set_locked().
+ */
+static int __mdd_lma_set(const struct lu_env *env, struct mdd_object *mdd_obj,
+                       const struct md_attr *ma, struct thandle *handle)
+{
+        struct mdd_thread_info *info = mdd_env_info(env);
+        struct lu_buf *buf;
+        struct lustre_mdt_attrs *lma =
+                                (struct lustre_mdt_attrs *) info->mti_xattr_buf;
+        int lmasize = sizeof(struct lustre_mdt_attrs);
+        int rc = 0;
+
+        ENTRY;
+
+        memset(lma, 0, lmasize);
+
+        /* Either HSM or SOM part is not valid, we need to read it before */
+        if ((!ma->ma_valid) & (MA_HSM | MA_SOM)) {
+                rc = mdd_get_md(env, mdd_obj, lma, &lmasize, XATTR_NAME_LMA);
+                if (rc)
+                        RETURN(rc);
+
+                lustre_lma_swab(lma);
+        }
+
+        /* Copy HSM data */
+        if (ma->ma_valid & MA_HSM) {
+                lma->lma_flags  |= ma->ma_hsm_flags & HSM_FLAGS_MASK;
+                lma->lma_compat |= LMAC_HSM;
+        }
+        /* XXX: Copy SOM data */
+        if (ma->ma_valid & MA_SOM) {
+                /*
+                lma->lma_compat |= LMAC_SOM;
+                */
+                LASSERT(!(ma->ma_valid & MA_SOM));
+        }
+
+        /* Copy FID */
+        memcpy(&lma->lma_self_fid, mdo2fid(mdd_obj), sizeof(lma->lma_self_fid));
+
+        lustre_lma_swab(lma);
+        buf = mdd_buf_get(env, lma, lmasize);
+        rc = __mdd_xattr_set(env, mdd_obj, buf, XATTR_NAME_LMA, 0, handle);
+
+        RETURN(rc);
+}
+
+/**
+ * Save LMA extended attributes with data from \a ma.
+ *
+ * HSM and Size-On-MDS data will be extracted from \ma if they are valid, if
+ * not, LMA EA will be first read from disk, modified and write back.
+ *
+ */
+static int mdd_lma_set_locked(const struct lu_env *env,
+                              struct mdd_object *mdd_obj,
+                              const struct md_attr *ma, struct thandle *handle)
+{
+        int rc;
+
+        mdd_write_lock(env, mdd_obj, MOR_TGT_CHILD);
+        rc = __mdd_lma_set(env, mdd_obj, ma, handle);
+        mdd_write_unlock(env, mdd_obj);
+        return rc;
+}
+
 /* set attr and LOV EA at once, return updated attr */
 static int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
                         const struct md_attr *ma)
@@ -1270,6 +1394,7 @@ static int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
         struct lu_attr *la_copy = &mdd_env_info(env)->mti_la_for_fix;
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qnids[MAXQUOTAS] = { 0, 0 };
         unsigned int qoids[MAXQUOTAS] = { 0, 0 };
@@ -1323,15 +1448,16 @@ static int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
                         mdd_quota_wrapper(la_copy, qnids);
                         mdd_quota_wrapper(la_tmp, qoids);
                         /* get file quota for new owner */
-                        lquota_chkquota(mds_quota_interface_ref, obd, qnids,
-                                        inode_pending, 1, NULL, 0, NULL, 0);
+                        lquota_chkquota(mds_quota_interface_ref, obd, exp,
+                                        qnids, inode_pending, 1, NULL, 0,
+                                        NULL, 0);
                         block_count = (la_tmp->la_blocks + 7) >> 3;
                         if (block_count) {
                                 void *data = NULL;
                                 mdd_data_get(env, mdd_obj, &data);
                                 /* get block quota for new owner */
                                 lquota_chkquota(mds_quota_interface_ref, obd,
-                                                qnids, block_pending,
+                                                exp, qnids, block_pending,
                                                 block_count, NULL,
                                                 LQUOTA_FLAGS_BLK, data, 1);
                         }
@@ -1374,6 +1500,14 @@ static int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
                 }
 
         }
+        if (rc == 0 && ma->ma_valid & (MA_HSM | MA_SOM)) {
+                umode_t mode;
+
+                mode = mdd_object_type(mdd_obj);
+                if (S_ISREG(mode))
+                        rc = mdd_lma_set_locked(env, mdd_obj, ma, handle);
+
+        }
 cleanup:
         if ((rc == 0) && (ma->ma_attr.la_valid & (LA_MTIME | LA_CTIME)))
                 rc = mdd_changelog_data_store(env, mdd, CL_SETATTR, mdd_obj,
@@ -1652,6 +1786,7 @@ static int mdd_object_create(const struct lu_env *env,
         struct thandle *handle;
 #ifdef HAVE_QUOTA_SUPPORT
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct mds_obd *mds = &obd->u.mds;
         unsigned int qids[MAXQUOTAS] = { 0, 0 };
         int quota_opc = 0, block_count = 0;
@@ -1666,8 +1801,9 @@ static int mdd_object_create(const struct lu_env *env,
                 quota_opc = FSFILT_OP_CREATE_PARTIAL_CHILD;
                 mdd_quota_wrapper(&ma->ma_attr, qids);
                 /* get file quota for child */
-                lquota_chkquota(mds_quota_interface_ref, obd, qids,
-                                inode_pending, 1, NULL, 0, NULL, 0);
+                lquota_chkquota(mds_quota_interface_ref, obd, exp,
+                                qids, inode_pending, 1, NULL, 0,
+                                NULL, 0);
                 switch (ma->ma_attr.la_mode & S_IFMT) {
                 case S_IFLNK:
                 case S_IFDIR:
@@ -1679,9 +1815,9 @@ static int mdd_object_create(const struct lu_env *env,
                 }
                 /* get block quota for child */
                 if (block_count)
-                        lquota_chkquota(mds_quota_interface_ref, obd, qids,
-                                        block_pending, block_count, NULL,
-                                        LQUOTA_FLAGS_BLK, NULL, 0);
+                        lquota_chkquota(mds_quota_interface_ref, obd, exp,
+                                        qids, block_pending, block_count,
+                                        NULL, LQUOTA_FLAGS_BLK, NULL, 0);
         }
 #endif
 
index d246a07..0601b2e 100644 (file)
@@ -93,10 +93,11 @@ int mdd_quota_recovery(const struct lu_env *env, struct md_device *m)
 }
 
 int mdd_quota_check(const struct lu_env *env, struct md_device *m,
-                    struct obd_export *exp, __u32 type)
+                    __u32 type)
 {
         struct mdd_device *mdd = lu2mdd_dev(&m->md_lu_dev);
         struct obd_device *obd = mdd->mdd_obd_dev;
+        struct obd_export *exp = md_quota(env)->mq_exp;
         struct obd_quotactl *oqctl = &mdd_env_info(env)->mti_oqctl;
         int rc;
         ENTRY;
index 8619ae5..6c45e4a 100644 (file)
@@ -123,12 +123,10 @@ int mds_obd_create(struct obd_export *exp, struct obdo *oa,
         if (IS_ERR(handle))
                 GOTO(out_dput, rc = PTR_ERR(handle));
 
-        VFS_RENAME_LOCK(mds->mds_objects_dir->d_inode);
         rc = ll_vfs_rename(mds->mds_objects_dir->d_inode, filp->f_dentry,
                            filp->f_vfsmnt, mds->mds_objects_dir->d_inode,
                            new_child, filp->f_vfsmnt);
 
-        VFS_RENAME_UNLOCK(mds->mds_objects_dir->d_inode);
         if (rc)
                 CERROR("error renaming new object "LPU64":%u: rc %d\n",
                        oa->o_id, oa->o_generation, rc);
index 7f471cd..482d04f 100644 (file)
@@ -292,9 +292,6 @@ static int mds_llog_add_unlink(struct obd_device *obd,
         struct llog_ctxt *ctxt;
         int rc;
 
-        rc = obd_checkmd(obd->u.mds.mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                RETURN(rc);
         /* first prepare unlink log record */
         OBD_ALLOC_PTR(lur);
         if (!lur)
@@ -345,9 +342,6 @@ int mds_log_op_orphan(struct obd_device *obd, struct lov_stripe_md *lsm,
         if (IS_ERR(mds->mds_osc_obd))
                 RETURN(PTR_ERR(mds->mds_osc_obd));
 
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                RETURN(rc);
         rc = mds_llog_add_unlink(obd, lsm, count - 1, &logcookie, 1, th);
         RETURN(rc);
 }
index 8e7180e..b118390 100644 (file)
@@ -1490,6 +1490,7 @@ static int mdt_reint_internal(struct mdt_thread_info *info,
 {
         struct req_capsule      *pill = info->mti_pill;
         struct mdt_device       *mdt = info->mti_mdt;
+        struct md_quota         *mq = md_quota(info->mti_env);
         struct mdt_body         *repbody;
         int                      rc = 0;
         ENTRY;
@@ -1548,6 +1549,7 @@ static int mdt_reint_internal(struct mdt_thread_info *info,
                 rc = lustre_msg_get_status(mdt_info_req(info)->rq_repmsg);
                 GOTO(out_ucred, rc);
         }
+        mq->mq_exp = info->mti_exp;
         rc = mdt_reint_rec(info, lhc);
         EXIT;
 out_ucred:
@@ -1697,6 +1699,7 @@ static int mdt_quotacheck_handle(struct mdt_thread_info *info)
         struct obd_quotactl *oqctl;
         struct req_capsule *pill = info->mti_pill;
         struct obd_export *exp = info->mti_exp;
+        struct md_quota *mq = md_quota(info->mti_env);
         struct md_device *next = info->mti_mdt->mdt_child;
         int rc;
         ENTRY;
@@ -1713,7 +1716,8 @@ static int mdt_quotacheck_handle(struct mdt_thread_info *info)
         if (rc)
                 RETURN(rc);
 
-        rc = next->md_ops->mdo_quota.mqo_check(info->mti_env, next, exp,
+        mq->mq_exp = exp;
+        rc = next->md_ops->mdo_quota.mqo_check(info->mti_env, next,
                                                oqctl->qc_type);
         RETURN(rc);
 }
@@ -1723,6 +1727,7 @@ static int mdt_quotactl_handle(struct mdt_thread_info *info)
         struct obd_quotactl *oqctl, *repoqc;
         struct req_capsule *pill = info->mti_pill;
         struct obd_export *exp = info->mti_exp;
+        struct md_quota *mq = md_quota(info->mti_env);
         struct md_device *next = info->mti_mdt->mdt_child;
         const struct md_quota_operations *mqo = &next->md_ops->mdo_quota;
         int id, rc;
@@ -1766,6 +1771,7 @@ static int mdt_quotactl_handle(struct mdt_thread_info *info)
         repoqc = req_capsule_server_get(pill, &RMF_OBD_QUOTACTL);
         LASSERT(repoqc != NULL);
 
+        mq->mq_exp = exp;
         switch (oqctl->qc_cmd) {
         case Q_QUOTAON:
                 rc = mqo->mqo_on(info->mti_env, next, oqctl->qc_type);
@@ -2762,7 +2768,7 @@ static int mdt_recovery(struct mdt_thread_info *info)
                 }
         }
 
-        if (unlikely(req->rq_export == NULL)) {
+        if (unlikely(!class_connected_export(req->rq_export))) {
                 CERROR("operation %d on unconnected MDS from %s\n",
                        lustre_msg_get_opc(req->rq_reqmsg),
                        libcfs_id2str(req->rq_peer));
@@ -3174,7 +3180,7 @@ int mdt_intent_lock_replace(struct mdt_thread_info *info,
                 new_lock->l_writers--;
         }
 
-        new_lock->l_export = class_export_lock_get(req->rq_export);
+        new_lock->l_export = class_export_lock_get(req->rq_export, new_lock);
         new_lock->l_blocking_ast = lock->l_blocking_ast;
         new_lock->l_completion_ast = lock->l_completion_ast;
         new_lock->l_remote_handle = lock->l_remote_handle;
@@ -3182,9 +3188,9 @@ int mdt_intent_lock_replace(struct mdt_thread_info *info,
 
         unlock_res_and_lock(new_lock);
 
-        lustre_hash_add(new_lock->l_export->exp_lock_hash,
-                        &new_lock->l_remote_handle,
-                        &new_lock->l_exp_hash);
+        cfs_hash_add(new_lock->l_export->exp_lock_hash,
+                     &new_lock->l_remote_handle,
+                     &new_lock->l_exp_hash);
 
         LDLM_LOCK_RELEASE(new_lock);
         lh->mlh_reg_lh.cookie = 0;
@@ -3209,7 +3215,7 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info,
         dlmreq = req_capsule_client_get(info->mti_pill, &RMF_DLM_REQ);
         remote_hdl = dlmreq->lock_handle[0];
 
-        lock = lustre_hash_lookup(exp->exp_lock_hash, &remote_hdl);
+        lock = cfs_hash_lookup(exp->exp_lock_hash, &remote_hdl);
         if (lock) {
                 if (lock != new_lock) {
                         lh->mlh_reg_lh.cookie = lock->l_handle.h_cookie;
@@ -3221,11 +3227,11 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info,
                                   lh->mlh_reg_lh.cookie);
                         if (old_lock)
                                 *old_lock = LDLM_LOCK_GET(lock);
-                        lh_put(exp->exp_lock_hash, &lock->l_exp_hash);
+                        cfs_hash_put(exp->exp_lock_hash, &lock->l_exp_hash);
                         return;
                 }
 
-                lh_put(exp->exp_lock_hash, &lock->l_exp_hash);
+                cfs_hash_put(exp->exp_lock_hash, &lock->l_exp_hash);
         }
 
         /*
@@ -4086,7 +4092,7 @@ static int mdt_start_ptlrpc_service(struct mdt_device *m)
                                      procfs_entry, target_print_req,"mdt_xmds");
 
         if (m->mdt_xmds_service == NULL) {
-                CERROR("failed to start readpage service\n");
+                CERROR("failed to start xmds service\n");
                 GOTO(err_mdt_svc, rc = -ENOMEM);
         }
 
index 336019c..64ae5e7 100644 (file)
@@ -710,8 +710,8 @@ static inline int mdt_fid_lock(struct ldlm_namespace *ns,
 
         rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
                                     mode, &flags, mdt_blocking_ast,
-                                    ldlm_completion_ast,
-                                    NULL, NULL, 0, NULL, client_cookie, lh);
+                                    ldlm_completion_ast, NULL, NULL, 0,
+                                    client_cookie, lh);
         return rc == ELDLM_OK ? 0 : -EIO;
 }
 
index eecda3e..3b61112 100644 (file)
@@ -749,7 +749,7 @@ static int lprocfs_mdt_wr_mdc(struct file *file, const char *buffer,
         sscanf(buffer, "%40s", tmpbuf);
 
         obd_str2uuid(&uuid, tmpbuf);
-        exp = lustre_hash_lookup(obd->obd_uuid_hash, &uuid);
+        exp = cfs_hash_lookup(obd->obd_uuid_hash, &uuid);
         if (exp == NULL) {
                 CERROR("%s: no export %s found\n",
                        obd->obd_name, obd_uuid2str(&uuid));
index 9e821f0..f98b7a7 100644 (file)
@@ -970,9 +970,8 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
         LASSERT(info->mti_pill->rc_fmt == &RQF_LDLM_INTENT_OPEN);
         ldlm_rep = req_capsule_server_get(info->mti_pill, &RMF_DLM_REP);
 
-        /* JOIN file was deprecated since 1.6.5, but may be revived one day */
-        if (create_flags & MDS_OPEN_JOIN_FILE) {
-                CERROR("file join is unsupported in this version of Lustre\n");
+        if (unlikely(create_flags & MDS_OPEN_JOIN_FILE)) {
+                CERROR("file join is not supported anymore.\n");
                 GOTO(out, result = err_serious(-EOPNOTSUPP));
         }
         msg_flags = lustre_msg_get_flags(req->rq_reqmsg);
index ddb0395..8eae61b 100644 (file)
@@ -193,9 +193,9 @@ static int mdt_last_rcvd_header_write(const struct lu_env *env,
         RETURN(rc);
 }
 
-static int mdt_last_rcvd_read(const struct lu_env *env,
-                              struct mdt_device *mdt,
-                              struct lsd_client_data *lcd, loff_t *off)
+static int mdt_last_rcvd_read(const struct lu_env *env, struct mdt_device *mdt,
+                              struct lsd_client_data *lcd, loff_t *off, 
+                              int index)
 {
         struct mdt_thread_info *mti;
         struct lsd_client_data *tmp;
@@ -205,8 +205,10 @@ static int mdt_last_rcvd_read(const struct lu_env *env,
         tmp = &mti->mti_lcd;
         rc = dt_record_read(env, mdt->mdt_last_rcvd,
                             mdt_buf(env, tmp, sizeof(*tmp)), off);
-        if (rc == 0)
+        if (rc == 0) {
+                check_lcd(mdt2obd_dev(mdt)->obd_name, index, tmp);
                 lcd_le_to_cpu(tmp, lcd);
+        }
 
         CDEBUG(D_INFO, "read lcd @%d rc = %d, uuid = %s, last_transno = "LPU64
                ", last_xid = "LPU64", last_result = %u, last_data = %u, "
@@ -278,7 +280,7 @@ static int mdt_clients_data_init(const struct lu_env *env,
                 off = lsd->lsd_client_start +
                         cl_idx * lsd->lsd_client_size;
 
-                rc = mdt_last_rcvd_read(env, mdt, lcd, &off);
+                rc = mdt_last_rcvd_read(env, mdt, lcd, &off, cl_idx);
                 if (rc) {
                         CERROR("error reading MDS %s idx %d, off %llu: rc %d\n",
                                LAST_RCVD, cl_idx, off, rc);
index 38502ef..0939947 100644 (file)
@@ -813,14 +813,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
         int rc;
         ENTRY;
 
-        /*
-         * Disable global rename BFL lock temporarily because
-         * when a mds do rename recoverying, which might enqueue
-         * BFL lock to the controller mds. and this req might be
-         * replay req for controller mds. but we did not have
-         * such handling in controller mds. XXX
-         */
-        RETURN(0);
         ms = mdt_md_site(info->mti_mdt);
         fid_build_reg_res_name(&LUSTRE_BFL_FID, res_id);
 
@@ -837,7 +829,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
                 rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
                                             LCK_EX, &flags, ldlm_blocking_ast,
                                             ldlm_completion_ast, NULL, NULL, 0,
-                                            NULL,
                                             &info->mti_exp->exp_handle.h_cookie,
                                             lh);
         } else {
@@ -849,9 +840,8 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
                  * This is the case mdt0 is remote node, issue DLM lock like
                  * other clients.
                  */
-                rc = ldlm_cli_enqueue(ms->ms_control_exp,
-                                      NULL, &einfo, res_id,
-                                      policy, &flags, NULL, 0, NULL, lh, 0);
+                rc = ldlm_cli_enqueue(ms->ms_control_exp, NULL, &einfo, res_id,
+                                      policy, &flags, NULL, 0, lh, 0);
         }
 
         RETURN(rc);
@@ -860,9 +850,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info,
 static void mdt_rename_unlock(struct lustre_handle *lh)
 {
         ENTRY;
-        /* Disable global rename BFL lock temporarily. see above XXX*/
-        EXIT;
-        return;
         LASSERT(lustre_handle_is_used(lh));
         ldlm_lock_decref(lh, LCK_EX);
         EXIT;
index 071afcd..1701c67 100644 (file)
@@ -796,29 +796,27 @@ static int mgc_set_mgs_param(struct obd_export *exp,
 {
         struct ptlrpc_request *req;
         struct mgs_send_param *req_msp, *rep_msp;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*req_msp) };
-        __u32 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);
+        req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
+                                        &RQF_MGS_SET_INFO, LUSTRE_MGS_VERSION,
+                                        MGS_SET_INFO);
         if (!req)
                 RETURN(-ENOMEM);
 
-        req_msp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*req_msp));
+        req_msp = req_capsule_client_get(&req->rq_pill, &RMF_MGS_SEND_PARAM);
         if (!req_msp) {
                 ptlrpc_req_finished(req);
                 RETURN(-ENOMEM);
         }
 
         memcpy(req_msp, msp, sizeof(*req_msp));
-        ptlrpc_req_set_repsize(req, 2, rep_size);
+        ptlrpc_request_set_replen(req);
 
         rc = ptlrpc_queue_wait(req);
         if (!rc) {
-                rep_msp = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                             sizeof(*rep_msp), NULL);
+                rep_msp = req_capsule_server_get(&req->rq_pill, &RMF_MGS_SEND_PARAM);
                 memcpy(msp, rep_msp, sizeof(*rep_msp));
         }
 
@@ -851,8 +849,8 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
         /* 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);
+        rc = ldlm_cli_enqueue(exp, NULL, &einfo, &cld->cld_resid, NULL, flags,
+                              NULL, 0, lockh, 0);
         /* A failed enqueue should still call the mgc_blocking_ast,
            where it will be requeued if needed ("grant failed"). */
 
index bd4b8f4..dc526b8 100644 (file)
@@ -336,7 +336,7 @@ static int mgs_get_cfg_lock(struct obd_device *obd, char *fsname,
                                             LDLM_PLAIN, NULL, LCK_EX,
                                             &flags, ldlm_blocking_ast,
                                             ldlm_completion_ast, NULL,
-                                            fsname, 0, NULL, NULL, lockh);
+                                            fsname, 0, NULL, lockh);
         if (rc)
                 CERROR("can't take cfg lock for %s (%d)\n", fsname, rc);
 
@@ -640,7 +640,7 @@ int mgs_handle(struct ptlrpc_request *req)
                 GOTO(out, rc = 0);
 
         if (opc != MGS_CONNECT) {
-                if (req->rq_export == NULL) {
+                if (!class_connected_export(req->rq_export)) {
                         CERROR("lustre_mgs: operation %d on unconnected MGS\n",
                                opc);
                         req->rq_status = -ENOTCONN;
index 53fd023..894e1e9 100644 (file)
@@ -8,8 +8,8 @@ default: all
 sources:
 
 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 llog_osd.o
-obdclass-all-objs += debug.o genops.o uuid.o llog_ioctl.o
+obdclass-all-objs += class_obd.o debug.o genops.o uuid.o llog_ioctl.o
+obdclass-all-objs += llog_osd.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 mea.o
 obdclass-all-objs += lu_object.o dt_object.o hash.o capa.o lu_time.o
index af30e10..df8d06d 100644 (file)
@@ -8,7 +8,7 @@ if LIBLUSTRE
 
 noinst_LIBRARIES = liblustreclass.a
 liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c mea.c uuid.c 
-liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c class_hash.c
+liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.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 capa.c
 liblustreclass_a_SOURCES += lu_object.c cl_object.c lu_time.c lu_ref.c
index fffe551..d9c6d51 100644 (file)
@@ -323,12 +323,11 @@ static int cl_lockset_lock_one(const struct lu_env *env,
 
         ENTRY;
 
-        lock = cl_lock_request(env, io, &link->cill_descr, link->cill_enq_flags,
-                               "io", io);
+        lock = cl_lock_request(env, io, &link->cill_descr, "io", io);
         if (!IS_ERR(lock)) {
                 link->cill_lock = lock;
                 list_move(&link->cill_linkage, &set->cls_curr);
-                if (!(link->cill_enq_flags & CEF_ASYNC)) {
+                if (!(link->cill_descr.cld_enq_flags & CEF_ASYNC)) {
                         result = cl_wait(env, lock);
                         if (result == 0)
                                 list_move(&link->cill_linkage, &set->cls_done);
@@ -573,7 +572,7 @@ static void cl_free_io_lock_link(const struct lu_env *env,
  * Allocates new lock link, and uses it to add a lock to a lockset.
  */
 int cl_io_lock_alloc_add(const struct lu_env *env, struct cl_io *io,
-                         struct cl_lock_descr *descr, int enqflags)
+                         struct cl_lock_descr *descr)
 {
         struct cl_io_lock_link *link;
         int result;
@@ -582,7 +581,6 @@ int cl_io_lock_alloc_add(const struct lu_env *env, struct cl_io *io,
         OBD_ALLOC_PTR(link);
         if (link != NULL) {
                 link->cill_descr     = *descr;
-                link->cill_enq_flags = enqflags;
                 link->cill_fini      = cl_free_io_lock_link;
                 result = cl_io_lock_add(env, io, link);
                 if (result) /* lock match */
@@ -1635,23 +1633,16 @@ int cl_sync_io_wait(const struct lu_env *env, struct cl_io *io,
                           atomic_read(&anchor->csi_sync_nr) == 0,
                           &lwi);
         if (rc < 0) {
-                int rc2;
-
                 CERROR("SYNC IO failed with error: %d, try to cancel "
-                       "the remaining page\n", rc);
-
-                rc2 = cl_io_cancel(env, io, queue);
-                if (rc2 < 0) {
-                        lwi = (struct l_wait_info) { 0 };
-                        /* Too bad, some pages are still in IO. */
-                        CERROR("Failed to cancel transfer error: %d, mostly "
-                               "because of they are still being transferred, "
-                               "waiting for %i pages\n",
-                               rc2, atomic_read(&anchor->csi_sync_nr));
-                        (void)l_wait_event(anchor->csi_waitq,
-                                     atomic_read(&anchor->csi_sync_nr) == 0,
-                                     &lwi);
-                }
+                       "%d remaining pages\n",
+                       rc, atomic_read(&anchor->csi_sync_nr));
+
+                (void)cl_io_cancel(env, io, queue);
+
+                lwi = (struct l_wait_info) { 0 };
+                (void)l_wait_event(anchor->csi_waitq,
+                                   atomic_read(&anchor->csi_sync_nr) == 0,
+                                   &lwi);
         } else {
                 rc = anchor->csi_sync_rc;
         }
@@ -1675,6 +1666,7 @@ void cl_sync_io_note(struct cl_sync_io *anchor, int ioret)
          * ->{prepare,commit}_write(). Completion is used to signal the end of
          * IO.
          */
+        LASSERT(atomic_read(&anchor->csi_sync_nr) > 0);
         if (atomic_dec_and_test(&anchor->csi_sync_nr))
                 cfs_waitq_broadcast(&anchor->csi_waitq);
         EXIT;
index c35d7b7..ce219a2 100644 (file)
@@ -127,6 +127,23 @@ static struct cl_thread_counters *cl_lock_counters(const struct lu_env *env,
         return &info->clt_counters[nesting];
 }
 
+static void cl_lock_trace0(int level, const struct lu_env *env,
+                           const char *prefix, const struct cl_lock *lock,
+                           const char *func, const int line)
+{
+        struct cl_object_header *h = cl_object_header(lock->cll_descr.cld_obj);
+        CDEBUG(level, "%s: %p@(%i %p %i %d %d %d %d %lx)"
+                      "(%p/%d/%i) at %s():%d\n",
+               prefix, lock,
+               atomic_read(&lock->cll_ref), lock->cll_guarder, lock->cll_depth,
+               lock->cll_state, lock->cll_error, lock->cll_holds,
+               lock->cll_users, lock->cll_flags,
+               env, h->coh_nesting, cl_lock_nr_mutexed(env),
+               func, line);
+}
+#define cl_lock_trace(level, env, prefix, lock)                         \
+        cl_lock_trace0(level, env, prefix, lock, __FUNCTION__, __LINE__)
+
 #define RETIP ((unsigned long)__builtin_return_address(0))
 
 #ifdef CONFIG_LOCKDEP
@@ -244,6 +261,7 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)
         LINVRNT(!cl_lock_is_mutexed(lock));
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "free lock", lock);
         might_sleep();
         while (!list_empty(&lock->cll_layers)) {
                 struct cl_lock_slice *slice;
@@ -347,6 +365,7 @@ EXPORT_SYMBOL(cl_lock_get_trust);
 static void cl_lock_finish(const struct lu_env *env, struct cl_lock *lock)
 {
         cl_lock_mutex_get(env, lock);
+        cl_lock_cancel(env, lock);
         cl_lock_delete(env, lock);
         cl_lock_mutex_put(env, lock);
         cl_lock_put(env, lock);
@@ -491,16 +510,15 @@ static struct cl_lock *cl_lock_lookup(const struct lu_env *env,
 
                 LASSERT(cl_is_lock(lock));
                 matched = cl_lock_ext_match(&lock->cll_descr, need) &&
-                        lock->cll_state < CLS_FREEING &&
-                        !(lock->cll_flags & CLF_CANCELLED) &&
-                        cl_lock_fits_into(env, lock, need, io);
+                          lock->cll_state < CLS_FREEING &&
+                          lock->cll_error == 0 &&
+                          !(lock->cll_flags & CLF_CANCELLED) &&
+                          cl_lock_fits_into(env, lock, need, io);
                 CDEBUG(D_DLMTRACE, "has: "DDESCR"(%i) need: "DDESCR": %d\n",
                        PDESCR(&lock->cll_descr), lock->cll_state, PDESCR(need),
                        matched);
                 if (matched) {
                         cl_lock_get_trust(lock);
-                        /* move the lock to the LRU head */
-                        list_move(&lock->cll_linkage, &head->coh_locks);
                         atomic_inc(&cl_object_site(obj)->cs_locks.cs_hit);
                         RETURN(lock);
                 }
@@ -545,7 +563,7 @@ static struct cl_lock *cl_lock_find(const struct lu_env *env,
                         spin_lock(&head->coh_lock_guard);
                         ghost = cl_lock_lookup(env, obj, io, need);
                         if (ghost == NULL) {
-                                list_add(&lock->cll_linkage, &head->coh_locks);
+                                list_add_tail(&lock->cll_linkage, &head->coh_locks);
                                 spin_unlock(&head->coh_lock_guard);
                                 atomic_inc(&site->cs_locks.cs_busy);
                         } else {
@@ -634,14 +652,6 @@ const struct cl_lock_slice *cl_lock_at(const struct cl_lock *lock,
 }
 EXPORT_SYMBOL(cl_lock_at);
 
-static void cl_lock_trace(struct cl_thread_counters *counters,
-                          const char *prefix, const struct cl_lock *lock)
-{
-        CDEBUG(D_DLMTRACE|D_TRACE, "%s: %i@%p %p %i %i\n", prefix,
-               atomic_read(&lock->cll_ref), lock, lock->cll_guarder,
-               lock->cll_depth, counters->ctc_nr_locks_locked);
-}
-
 static void cl_lock_mutex_tail(const struct lu_env *env, struct cl_lock *lock)
 {
         struct cl_thread_counters *counters;
@@ -650,7 +660,7 @@ static void cl_lock_mutex_tail(const struct lu_env *env, struct cl_lock *lock)
         lock->cll_depth++;
         counters->ctc_nr_locks_locked++;
         lu_ref_add(&counters->ctc_locks_locked, "cll_guard", lock);
-        cl_lock_trace(counters, "got mutex", lock);
+        cl_lock_trace(D_TRACE, env, "got mutex", lock);
 }
 
 /**
@@ -742,7 +752,7 @@ void cl_lock_mutex_put(const struct lu_env *env, struct cl_lock *lock)
         counters = cl_lock_counters(env, lock);
         LINVRNT(counters->ctc_nr_locks_locked > 0);
 
-        cl_lock_trace(counters, "put mutex", lock);
+        cl_lock_trace(D_TRACE, env, "put mutex", lock);
         lu_ref_del(&counters->ctc_locks_locked, "cll_guard", lock);
         counters->ctc_nr_locks_locked--;
         if (--lock->cll_depth == 0) {
@@ -810,6 +820,7 @@ static void cl_lock_delete0(const struct lu_env *env, struct cl_lock *lock)
 
         ENTRY;
         if (lock->cll_state < CLS_FREEING) {
+                LASSERT(lock->cll_state != CLS_INTRANSIT);
                 cl_lock_state_set(env, lock, CLS_FREEING);
 
                 head = cl_object_header(lock->cll_descr.cld_obj);
@@ -888,6 +899,7 @@ static void cl_lock_hold_release(const struct lu_env *env, struct cl_lock *lock,
         LASSERT(lock->cll_holds > 0);
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "hold release lock", lock);
         lu_ref_del(&lock->cll_holders, scope, source);
         cl_lock_hold_mod(env, lock, -1);
         if (lock->cll_holds == 0) {
@@ -942,6 +954,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
         LASSERT(lock->cll_depth == 1);
         LASSERT(lock->cll_state != CLS_FREEING); /* too late to wait */
 
+        cl_lock_trace(D_DLMTRACE, env, "state wait lock", lock);
         result = lock->cll_error;
         if (result == 0) {
                 cfs_waitlink_init(&waiter);
@@ -987,6 +1000,7 @@ static void cl_lock_state_signal(const struct lu_env *env, struct cl_lock *lock,
 void cl_lock_signal(const struct lu_env *env, struct cl_lock *lock)
 {
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "state signal lock", lock);
         cl_lock_state_signal(env, lock, lock->cll_state);
         EXIT;
 }
@@ -1035,14 +1049,9 @@ static int cl_unuse_try_internal(const struct lu_env *env, struct cl_lock *lock)
         do {
                 result = 0;
 
-                if (lock->cll_error != 0)
-                        break;
-
                 LINVRNT(cl_lock_is_mutexed(lock));
                 LINVRNT(cl_lock_invariant(env, lock));
                 LASSERT(lock->cll_state == CLS_INTRANSIT);
-                LASSERT(lock->cll_users > 0);
-                LASSERT(lock->cll_holds > 0);
 
                 result = -ENOSYS;
                 list_for_each_entry_reverse(slice, &lock->cll_layers,
@@ -1056,7 +1065,7 @@ static int cl_unuse_try_internal(const struct lu_env *env, struct cl_lock *lock)
                 LASSERT(result != -ENOSYS);
         } while (result == CLO_REPEAT);
 
-        return result ?: lock->cll_error;
+        return result;
 }
 
 /**
@@ -1072,8 +1081,13 @@ int cl_use_try(const struct lu_env *env, struct cl_lock *lock, int atomic)
         enum cl_lock_state state;
 
         ENTRY;
-        result = -ENOSYS;
+        cl_lock_trace(D_DLMTRACE, env, "use lock", lock);
+
+        LASSERT(lock->cll_state == CLS_CACHED);
+        if (lock->cll_error)
+                RETURN(lock->cll_error);
 
+        result = -ENOSYS;
         state = cl_lock_intransit(env, lock);
         list_for_each_entry(slice, &lock->cll_layers, cls_linkage) {
                 if (slice->cls_ops->clo_use != NULL) {
@@ -1084,7 +1098,8 @@ int cl_use_try(const struct lu_env *env, struct cl_lock *lock, int atomic)
         }
         LASSERT(result != -ENOSYS);
 
-        LASSERT(lock->cll_state == CLS_INTRANSIT);
+        LASSERTF(lock->cll_state == CLS_INTRANSIT, "Wrong state %d.\n",
+                 lock->cll_state);
 
         if (result == 0) {
                 state = CLS_HELD;
@@ -1102,17 +1117,7 @@ int cl_use_try(const struct lu_env *env, struct cl_lock *lock, int atomic)
                 /* @atomic means back-off-on-failure. */
                 if (atomic) {
                         int rc;
-
-                        do {
-                                rc = cl_unuse_try_internal(env, lock);
-                                if (rc == 0)
-                                        break;
-                                if (rc == CLO_WAIT)
-                                        rc = cl_lock_state_wait(env, lock);
-                                if (rc < 0)
-                                        break;
-                        } while(1);
-
+                        rc = cl_unuse_try_internal(env, lock);
                         /* Vet the results. */
                         if (rc < 0 && result > 0)
                                 result = rc;
@@ -1168,6 +1173,7 @@ int cl_enqueue_try(const struct lu_env *env, struct cl_lock *lock,
         int result;
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "enqueue lock", lock);
         do {
                 result = 0;
 
@@ -1236,8 +1242,7 @@ static int cl_enqueue_locked(const struct lu_env *env, struct cl_lock *lock,
         } while (1);
         if (result != 0) {
                 cl_lock_user_del(env, lock);
-                if (result != -EINTR)
-                        cl_lock_error(env, lock, result);
+                cl_lock_error(env, lock, result);
         }
         LASSERT(ergo(result == 0, lock->cll_state == CLS_ENQUEUED ||
                      lock->cll_state == CLS_HELD));
@@ -1277,8 +1282,9 @@ EXPORT_SYMBOL(cl_enqueue);
  *
  * This function is called repeatedly by cl_unuse() until either lock is
  * unlocked, or error occurs.
+ * cl_unuse_try is a one-shot operation, so it must NOT return CLO_WAIT.
  *
- * \pre  lock->cll_state <= CLS_HELD || cl_lock_is_intransit(lock)
+ * \pre  lock->cll_state == CLS_HELD
  *
  * \post ergo(result == 0, lock->cll_state == CLS_CACHED)
  *
@@ -1291,30 +1297,26 @@ int cl_unuse_try(const struct lu_env *env, struct cl_lock *lock)
         enum cl_lock_state          state = CLS_NEW;
 
         ENTRY;
-        if (lock->cll_state != CLS_INTRANSIT) {
-                if (lock->cll_users > 1) {
-                        cl_lock_user_del(env, lock);
-                        RETURN(0);
-                }
-                /*
-                 * New lock users (->cll_users) are not protecting unlocking
-                 * from proceeding. From this point, lock eventually reaches
-                 * CLS_CACHED, is reinitialized to CLS_NEW or fails into
-                 * CLS_FREEING.
-                 */
-                state = cl_lock_intransit(env, lock);
+        cl_lock_trace(D_DLMTRACE, env, "unuse lock", lock);
+
+        LASSERT(lock->cll_state == CLS_HELD || lock->cll_state == CLS_ENQUEUED);
+        if (lock->cll_users > 1) {
+                cl_lock_user_del(env, lock);
+                RETURN(0);
         }
 
+        /*
+         * New lock users (->cll_users) are not protecting unlocking
+         * from proceeding. From this point, lock eventually reaches
+         * CLS_CACHED, is reinitialized to CLS_NEW or fails into
+         * CLS_FREEING.
+         */
+        state = cl_lock_intransit(env, lock);
+
         result = cl_unuse_try_internal(env, lock);
         LASSERT(lock->cll_state == CLS_INTRANSIT);
-        if (result != CLO_WAIT)
-                /*
-                 * Once there is no more need to iterate ->clo_unuse() calls,
-                 * remove lock user. This is done even if unrecoverable error
-                 * happened during unlocking, because nothing else can be
-                 * done.
-                 */
-                cl_lock_user_del(env, lock);
+        LASSERT(result != CLO_WAIT);
+        cl_lock_user_del(env, lock);
         if (result == 0 || result == -ESTALE) {
                 /*
                  * Return lock back to the cache. This is the only
@@ -1325,7 +1327,10 @@ int cl_unuse_try(const struct lu_env *env, struct cl_lock *lock)
                  * re-initialized. This happens e.g., when a sub-lock was
                  * canceled while unlocking was in progress.
                  */
-                state = result == 0 ? CLS_CACHED : CLS_NEW;
+                if (state == CLS_HELD && result == 0)
+                        state = CLS_CACHED;
+                else
+                        state = CLS_NEW;
                 cl_lock_extransit(env, lock, state);
 
                 /*
@@ -1339,7 +1344,7 @@ int cl_unuse_try(const struct lu_env *env, struct cl_lock *lock)
                  */
                 result = 0;
         } else {
-                CWARN("result = %d, this is unlikely!\n", result);
+                CERROR("result = %d, this is unlikely!\n", result);
                 cl_lock_extransit(env, lock, state);
         }
 
@@ -1352,19 +1357,13 @@ EXPORT_SYMBOL(cl_unuse_try);
 
 static void cl_unuse_locked(const struct lu_env *env, struct cl_lock *lock)
 {
+        int result;
         ENTRY;
-        LASSERT(lock->cll_state <= CLS_HELD);
-        do {
-                int result;
 
-                result = cl_unuse_try(env, lock);
-                if (result == CLO_WAIT) {
-                        result = cl_lock_state_wait(env, lock);
-                        if (result == 0)
-                                continue;
-                }
-                break;
-        } while (1);
+        result = cl_unuse_try(env, lock);
+        if (result)
+                CL_LOCK_DEBUG(D_ERROR, env, lock, "unuse return %d\n", result);
+
         EXIT;
 }
 
@@ -1398,6 +1397,7 @@ int cl_wait_try(const struct lu_env *env, struct cl_lock *lock)
         int                         result;
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "wait lock try", lock);
         do {
                 LINVRNT(cl_lock_is_mutexed(lock));
                 LINVRNT(cl_lock_invariant(env, lock));
@@ -1429,8 +1429,10 @@ int cl_wait_try(const struct lu_env *env, struct cl_lock *lock)
                         }
                 }
                 LASSERT(result != -ENOSYS);
-                if (result == 0)
+                if (result == 0) {
+                        LASSERT(lock->cll_state != CLS_INTRANSIT);
                         cl_lock_state_set(env, lock, CLS_HELD);
+                }
         } while (result == CLO_REPEAT);
         RETURN(result ?: lock->cll_error);
 }
@@ -1453,8 +1455,10 @@ int cl_wait(const struct lu_env *env, struct cl_lock *lock)
         cl_lock_mutex_get(env, lock);
 
         LINVRNT(cl_lock_invariant(env, lock));
-        LASSERT(lock->cll_state == CLS_ENQUEUED || lock->cll_state == CLS_HELD);
+        LASSERTF(lock->cll_state == CLS_ENQUEUED || lock->cll_state == CLS_HELD,
+                 "Wrong state %d \n", lock->cll_state);
         LASSERT(lock->cll_holds > 0);
+        cl_lock_trace(D_DLMTRACE, env, "wait lock", lock);
 
         do {
                 result = cl_wait_try(env, lock);
@@ -1467,8 +1471,7 @@ int cl_wait(const struct lu_env *env, struct cl_lock *lock)
         } while (1);
         if (result < 0) {
                 cl_lock_user_del(env, lock);
-                if (result != -EINTR)
-                        cl_lock_error(env, lock, result);
+                cl_lock_error(env, lock, result);
                 cl_lock_lockdep_release(env, lock);
         }
         cl_lock_mutex_put(env, lock);
@@ -1523,6 +1526,7 @@ int cl_lock_modify(const struct lu_env *env, struct cl_lock *lock,
         int result;
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "modify lock", lock);
         /* don't allow object to change */
         LASSERT(obj == desc->cld_obj);
         LINVRNT(cl_lock_is_mutexed(lock));
@@ -1615,8 +1619,9 @@ EXPORT_SYMBOL(cl_lock_closure_build);
 int cl_lock_enclosure(const struct lu_env *env, struct cl_lock *lock,
                       struct cl_lock_closure *closure)
 {
-        int result;
+        int result = 0;
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "enclosure lock", lock);
         if (!cl_lock_mutex_try(env, lock)) {
                 /*
                  * If lock->cll_inclosure is not empty, lock is already in
@@ -1658,6 +1663,7 @@ void cl_lock_disclosure(const struct lu_env *env,
         struct cl_lock *scan;
         struct cl_lock *temp;
 
+        cl_lock_trace(D_DLMTRACE, env, "disclosure lock", closure->clc_origin);
         list_for_each_entry_safe(scan, temp, &closure->clc_list, cll_inclosure){
                 list_del_init(&scan->cll_inclosure);
                 cl_lock_mutex_put(env, scan);
@@ -1706,6 +1712,7 @@ void cl_lock_delete(const struct lu_env *env, struct cl_lock *lock)
                      cl_lock_nr_mutexed(env) == 1));
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "delete lock", lock);
         if (lock->cll_holds == 0)
                 cl_lock_delete0(env, lock);
         else
@@ -1730,6 +1737,7 @@ void cl_lock_error(const struct lu_env *env, struct cl_lock *lock, int error)
         LINVRNT(cl_lock_invariant(env, lock));
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "set lock error", lock);
         if (lock->cll_error == 0 && error != 0) {
                 lock->cll_error = error;
                 cl_lock_signal(env, lock);
@@ -1757,6 +1765,7 @@ void cl_lock_cancel(const struct lu_env *env, struct cl_lock *lock)
         LINVRNT(cl_lock_invariant(env, lock));
 
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "cancel lock", lock);
         if (lock->cll_holds == 0)
                 cl_lock_cancel0(env, lock);
         else
@@ -1787,11 +1796,15 @@ struct cl_lock *cl_lock_at_page(const struct lu_env *env, struct cl_object *obj,
         need->cld_mode = CLM_READ; /* CLM_READ matches both READ & WRITE, but
                                     * not PHANTOM */
         need->cld_start = need->cld_end = page->cp_index;
+        need->cld_enq_flags = 0;
 
         spin_lock(&head->coh_lock_guard);
+        /* It is fine to match any group lock since there could be only one
+         * with a uniq gid and it conflicts with all other lock modes too */
         list_for_each_entry(scan, &head->coh_locks, cll_linkage) {
                 if (scan != except &&
-                    cl_lock_ext_match(&scan->cll_descr, need) &&
+                    (scan->cll_descr.cld_mode == CLM_GROUP ||
+                    cl_lock_ext_match(&scan->cll_descr, need)) &&
                     scan->cll_state >= CLS_HELD &&
                     scan->cll_state < CLS_FREEING &&
                     /*
@@ -2028,7 +2041,8 @@ static struct cl_lock *cl_lock_hold_mutex(const struct lu_env *env,
                 if (IS_ERR(lock))
                         break;
                 cl_lock_mutex_get(env, lock);
-                if (lock->cll_state < CLS_FREEING) {
+                if (lock->cll_state < CLS_FREEING &&
+                    !(lock->cll_flags & CLF_CANCELLED)) {
                         cl_lock_hold_mod(env, lock, +1);
                         lu_ref_add(&lock->cll_holders, scope, source);
                         lu_ref_add(&lock->cll_reference, scope, source);
@@ -2068,23 +2082,18 @@ EXPORT_SYMBOL(cl_lock_hold);
  */
 struct cl_lock *cl_lock_request(const struct lu_env *env, struct cl_io *io,
                                 const struct cl_lock_descr *need,
-                                __u32 enqflags,
                                 const char *scope, const void *source)
 {
         struct cl_lock       *lock;
         const struct lu_fid  *fid;
         int                   rc;
         int                   iter;
-        int warn;
+        __u32                 enqflags = need->cld_enq_flags;
 
         ENTRY;
         fid = lu_object_fid(&io->ci_obj->co_lu);
         iter = 0;
         do {
-                warn = iter >= 16 && IS_PO2(iter);
-                CDEBUG(warn ? D_WARNING : D_DLMTRACE,
-                       DDESCR"@"DFID" %i %08x `%s'\n",
-                       PDESCR(need), PFID(fid), iter, enqflags, scope);
                 lock = cl_lock_hold_mutex(env, io, need, scope, source);
                 if (!IS_ERR(lock)) {
                         rc = cl_enqueue_locked(env, lock, io, enqflags);
@@ -2094,11 +2103,10 @@ struct cl_lock *cl_lock_request(const struct lu_env *env, struct cl_io *io,
                                         cl_lock_lockdep_acquire(env,
                                                                 lock, enqflags);
                                         break;
-                                } else if (warn)
-                                        CL_LOCK_DEBUG(D_WARNING, env, lock,
-                                                      "got (see bug 17665)\n");
+                                }
                                 cl_unuse_locked(env, lock);
                         }
+                        cl_lock_trace(D_DLMTRACE, env, "enqueue failed", lock);
                         cl_lock_hold_release(env, lock, scope, source);
                         cl_lock_mutex_put(env, lock);
                         lu_ref_del(&lock->cll_reference, scope, source);
@@ -2155,6 +2163,7 @@ void cl_lock_release(const struct lu_env *env, struct cl_lock *lock,
 {
         LINVRNT(cl_lock_invariant(env, lock));
         ENTRY;
+        cl_lock_trace(D_DLMTRACE, env, "release lock", lock);
         cl_lock_mutex_get(env, lock);
         cl_lock_hold_release(env, lock, scope, source);
         cl_lock_mutex_put(env, lock);
@@ -2187,37 +2196,18 @@ int cl_lock_user_del(const struct lu_env *env, struct cl_lock *lock)
 }
 EXPORT_SYMBOL(cl_lock_user_del);
 
-/**
- * Check if two lock's mode are compatible.
- *
- * This returns true iff en-queuing \a lock2 won't cause cancellation of \a
- * lock1 even when these locks overlap.
- */
-int cl_lock_compatible(const struct cl_lock *lock1, const struct cl_lock *lock2)
-{
-        enum cl_lock_mode mode1;
-        enum cl_lock_mode mode2;
-
-        ENTRY;
-        mode1 = lock1->cll_descr.cld_mode;
-        mode2 = lock2->cll_descr.cld_mode;
-        RETURN(mode2 == CLM_PHANTOM ||
-               (mode1 == CLM_READ && mode2 == CLM_READ));
-}
-EXPORT_SYMBOL(cl_lock_compatible);
-
 const char *cl_lock_mode_name(const enum cl_lock_mode mode)
 {
         static const char *names[] = {
-                [CLM_PHANTOM] = "PHANTOM",
-                [CLM_READ]    = "READ",
-                [CLM_WRITE]   = "WRITE",
-                [CLM_GROUP]   = "GROUP"
+                [CLM_PHANTOM] = "P",
+                [CLM_READ]    = "R",
+                [CLM_WRITE]   = "W",
+                [CLM_GROUP]   = "G"
         };
         if (0 <= mode && mode < ARRAY_SIZE(names))
                 return names[mode];
         else
-                return "UNKNW";
+                return "U";
 }
 EXPORT_SYMBOL(cl_lock_mode_name);
 
index 4838a0a..3d6ef8c 100644 (file)
@@ -60,7 +60,7 @@
 #include <obd_support.h>
 #include <lustre_fid.h>
 #include <libcfs/list.h>
-#include <class_hash.h> /* for lustre_hash stuff */
+#include <libcfs/libcfs_hash.h> /* for cfs_hash stuff */
 /* lu_time_global_{init,fini}() */
 #include <lu_time.h>
 
@@ -533,7 +533,7 @@ struct cl_env {
          */
         struct hlist_node ce_node;
         /**
-         * Owner for the current cl_env, the key for lustre_hash.
+         * Owner for the current cl_env, the key for cfs_hash.
          * Now current thread pointer is stored.
          */
         void             *ce_owner;
@@ -562,20 +562,20 @@ struct cl_env {
         } while (0)
 
 /*****************************************************************************
- * Routins to use lustre_hash functionality to bind the current thread
+ * Routins to use cfs_hash functionality to bind the current thread
  * to cl_env
  */
 
 /** lustre hash to manage the cl_env for current thread */
-static lustre_hash_t *cl_env_hash;
+static cfs_hash_t *cl_env_hash;
 static void cl_env_init0(struct cl_env *cle, void *debug);
 
-static unsigned cl_env_hops_hash(lustre_hash_t *lh, void *key, unsigned mask)
+static unsigned cl_env_hops_hash(cfs_hash_t *lh, void *key, unsigned mask)
 {
 #if BITS_PER_LONG == 64
-        return lh_u64_hash((__u64)key, mask);
+        return cfs_hash_u64_hash((__u64)key, mask);
 #else
-        return lh_u32_hash((__u32)key, mask);
+        return cfs_hash_u32_hash((__u32)key, mask);
 #endif
 }
 
@@ -594,18 +594,18 @@ static int cl_env_hops_compare(void *key, struct hlist_node *hn)
         return (key == cle->ce_owner);
 }
 
-static lustre_hash_ops_t cl_env_hops = {
-        .lh_hash    = cl_env_hops_hash,
-        .lh_compare = cl_env_hops_compare,
-        .lh_key     = cl_env_hops_obj,
-        .lh_get     = cl_env_hops_obj,
-        .lh_put     = cl_env_hops_obj,
+static cfs_hash_ops_t cl_env_hops = {
+        .hs_hash    = cl_env_hops_hash,
+        .hs_compare = cl_env_hops_compare,
+        .hs_key     = cl_env_hops_obj,
+        .hs_get     = cl_env_hops_obj,
+        .hs_put     = cl_env_hops_obj,
 };
 
 static inline struct cl_env *cl_env_fetch(void)
 {
         struct cl_env *cle;
-        cle = lustre_hash_lookup(cl_env_hash, cfs_current());
+        cle = cfs_hash_lookup(cl_env_hash, cfs_current());
         LASSERT(ergo(cle, cle->ce_magic == &cl_env_init0));
         return cle;
 }
@@ -616,7 +616,7 @@ static inline void cl_env_attach(struct cl_env *cle)
                 int rc;
                 LASSERT(cle->ce_owner == NULL);
                 cle->ce_owner = cfs_current();
-                rc = lustre_hash_add_unique(cl_env_hash, cle->ce_owner,
+                rc = cfs_hash_add_unique(cl_env_hash, cle->ce_owner,
                                             &cle->ce_node);
                 LASSERT(rc == 0);
         }
@@ -629,7 +629,7 @@ static inline struct cl_env *cl_env_detach(struct cl_env *cle)
         if (cle && cle->ce_owner) {
                 void *cookie;
                 LASSERT(cle->ce_owner == cfs_current());
-                cookie = lustre_hash_del(cl_env_hash, cle->ce_owner,
+                cookie = cfs_hash_del(cl_env_hash, cle->ce_owner,
                                          &cle->ce_node);
                 cle->ce_owner = NULL;
                 LASSERT(cookie == cle);
@@ -1137,7 +1137,8 @@ int cl_global_init(void)
 {
         int result;
 
-        cl_env_hash = lustre_hash_init("cl_env", 8, 10, &cl_env_hops, 0);
+        cl_env_hash = cfs_hash_create("cl_env", 8, 10, &cl_env_hops,
+                                      CFS_HASH_REHASH);
         if (cl_env_hash == NULL)
                 return -ENOMEM;
 
@@ -1152,7 +1153,7 @@ int cl_global_init(void)
                 }
         }
         if (result)
-                lustre_hash_exit(cl_env_hash);
+                cfs_hash_destroy(cl_env_hash);
         return result;
 }
 
@@ -1165,5 +1166,5 @@ void cl_global_fini(void)
         cl_page_fini();
         lu_context_key_degister(&cl_key);
         lu_kmem_fini(cl_object_caches);
-        lustre_hash_exit(cl_env_hash);
+        cfs_hash_destroy(cl_env_hash);
 }
index 55887f9..b277cc5 100644 (file)
@@ -1320,6 +1320,8 @@ EXPORT_SYMBOL(cl_page_prep);
 void cl_page_completion(const struct lu_env *env,
                         struct cl_page *pg, enum cl_req_type crt, int ioret)
 {
+        struct cl_sync_io *anchor = pg->cp_sync_io;
+
         PASSERT(env, pg, crt < CRT_NR);
         /* cl_page::cp_req already cleared by the caller (osc_completion()) */
         PASSERT(env, pg, pg->cp_req == NULL);
@@ -1337,9 +1339,10 @@ void cl_page_completion(const struct lu_env *env,
         CL_PAGE_INVOID_REVERSE(env, pg, CL_PAGE_OP(io[crt].cpo_completion),
                                (const struct lu_env *,
                                 const struct cl_page_slice *, int), ioret);
-        if (pg->cp_sync_io) {
-                cl_sync_io_note(pg->cp_sync_io, ioret);
+        if (anchor) {
+                LASSERT(pg->cp_sync_io == anchor);
                 pg->cp_sync_io = NULL;
+                cl_sync_io_note(anchor, ioret);
         }
 
         /* Don't assert the page writeback bit here because the lustre file
diff --git a/lustre/obdclass/class_hash.c b/lustre/obdclass/class_hash.c
deleted file mode 100644 (file)
index bd7bb05..0000000
+++ /dev/null
@@ -1,768 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * 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 version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- * GPL HEADER END
- */
-/*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
- * Use is subject to license terms.
- */
-/*
- * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
- *
- * lustre/obdclass/class_hash.c
- *
- * Implement a hash class for hash process in lustre system.
- *
- * Author: YuZhangyong <yzy@clusterfs.com>
- *
- * 2008-08-15: Brian Behlendorf <behlendorf1@llnl.gov>
- * - Simplified API and improved documentation
- * - Added per-hash feature flags:
- *   * LH_DEBUG additional validation
- *   * LH_REHASH dynamic rehashing
- * - Added per-hash statistics
- * - General performance enhancements
- */
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#include <obd.h>
-#endif
-
-#include <class_hash.h>
-
-/**
- * Initialize new lustre hash, where:
- * \param name Descriptive hash name
- * \param cur_bits Initial hash table size, in bits
- * \param max_bits Maximum allowed hash table resize, in bits
- * \param ops Registered hash table operations
- * \param flags LH_REHASH enables dynamic hash resizing
- *              LH_SORT enables chained hash sort
- */
-lustre_hash_t *
-lustre_hash_init(char *name, unsigned int cur_bits, unsigned int max_bits,
-                 lustre_hash_ops_t *ops, int flags)
-{
-        lustre_hash_t *lh;
-        int            i;
-        ENTRY;
-
-        LASSERT(name != NULL);
-        LASSERT(ops != NULL);
-
-        LASSERT(cur_bits > 0);
-        LASSERT(max_bits >= cur_bits);
-        LASSERT(max_bits < 31);
-
-        OBD_ALLOC_PTR(lh);
-        if (!lh)
-                RETURN(NULL);
-
-        strncpy(lh->lh_name, name, sizeof(lh->lh_name));
-        lh->lh_name[sizeof(lh->lh_name) - 1] = '\0';
-        atomic_set(&lh->lh_rehash_count, 0);
-        atomic_set(&lh->lh_count, 0);
-        rwlock_init(&lh->lh_rwlock);
-        lh->lh_cur_bits = cur_bits;
-        lh->lh_cur_mask = (1 << cur_bits) - 1;
-        lh->lh_min_bits = cur_bits;
-        lh->lh_max_bits = max_bits;
-        /* XXX: need to fixup lustre_hash_rehash_bits() before this can be
-         *      anything other than 0.5 and 2.0 */
-        lh->lh_min_theta = 1 << (LH_THETA_BITS - 1);
-        lh->lh_max_theta = 1 << (LH_THETA_BITS + 1);
-        lh->lh_ops = ops;
-        lh->lh_flags = flags;
-
-        /* theta * 1000 */
-        __lustre_hash_set_theta(lh, 500, 2000);
-
-        OBD_VMALLOC(lh->lh_buckets, sizeof(*lh->lh_buckets) << lh->lh_cur_bits);
-        if (!lh->lh_buckets) {
-                OBD_FREE_PTR(lh);
-                RETURN(NULL);
-        }
-
-        for (i = 0; i <= lh->lh_cur_mask; i++) {
-                INIT_HLIST_HEAD(&lh->lh_buckets[i].lhb_head);
-                rwlock_init(&lh->lh_buckets[i].lhb_rwlock);
-                atomic_set(&lh->lh_buckets[i].lhb_count, 0);
-        }
-
-        return lh;
-}
-EXPORT_SYMBOL(lustre_hash_init);
-
-/**
- * Cleanup lustre hash \a lh.
- */
-void
-lustre_hash_exit(lustre_hash_t *lh)
-{
-        lustre_hash_bucket_t *lhb;
-        struct hlist_node    *hnode;
-        struct hlist_node    *pos;
-        int                   i;
-        ENTRY;
-
-        LASSERT(lh != NULL);
-
-        write_lock(&lh->lh_rwlock);
-
-        lh_for_each_bucket(lh, lhb, i) {
-                write_lock(&lhb->lhb_rwlock);
-                hlist_for_each_safe(hnode, pos, &(lhb->lhb_head)) {
-                        __lustre_hash_bucket_validate(lh, lhb, hnode);
-                        __lustre_hash_bucket_del(lh, lhb, hnode);
-                        lh_exit(lh, hnode);
-                }
-
-                LASSERT(hlist_empty(&(lhb->lhb_head)));
-                LASSERT(atomic_read(&lhb->lhb_count) == 0);
-                write_unlock(&lhb->lhb_rwlock);
-        }
-
-        LASSERT(atomic_read(&lh->lh_count) == 0);
-        write_unlock(&lh->lh_rwlock);
-
-        OBD_VFREE(lh->lh_buckets, sizeof(*lh->lh_buckets) << lh->lh_cur_bits);
-        OBD_FREE_PTR(lh);
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_exit);
-
-static inline unsigned int lustre_hash_rehash_bits(lustre_hash_t *lh)
-{
-        if (!(lh->lh_flags & LH_REHASH))
-                return 0;
-
-        /* XXX: need to handle case with max_theta != 2.0
-         *      and the case with min_theta != 0.5 */
-        if ((lh->lh_cur_bits < lh->lh_max_bits) &&
-            (__lustre_hash_theta(lh) > lh->lh_max_theta))
-                return lh->lh_cur_bits + 1;
-
-        if ((lh->lh_cur_bits > lh->lh_min_bits) &&
-            (__lustre_hash_theta(lh) < lh->lh_min_theta))
-                return lh->lh_cur_bits - 1;
-
-        return 0;
-}
-
-/**
- * Add item \a hnode to lustre hash \a lh using \a key.  The registered
- * ops->lh_get function will be called when the item is added.
- */
-void
-lustre_hash_add(lustre_hash_t *lh, void *key, struct hlist_node *hnode)
-{
-        lustre_hash_bucket_t *lhb;
-        int                   bits;
-        unsigned              i;
-        ENTRY;
-
-        __lustre_hash_key_validate(lh, key, hnode);
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-        LASSERT(hlist_unhashed(hnode));
-
-        write_lock(&lhb->lhb_rwlock);
-        __lustre_hash_bucket_add(lh, lhb, hnode);
-        write_unlock(&lhb->lhb_rwlock);
-
-        bits = lustre_hash_rehash_bits(lh);
-        read_unlock(&lh->lh_rwlock);
-        if (bits)
-                lustre_hash_rehash(lh, bits);
-
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_add);
-
-static struct hlist_node *
-lustre_hash_findadd_unique_hnode(lustre_hash_t *lh, void *key,
-                                 struct hlist_node *hnode)
-{
-        int                   bits = 0;
-        struct hlist_node    *ehnode;
-        lustre_hash_bucket_t *lhb;
-        unsigned              i;
-        ENTRY;
-
-        __lustre_hash_key_validate(lh, key, hnode);
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-        LASSERT(hlist_unhashed(hnode));
-
-        write_lock(&lhb->lhb_rwlock);
-        ehnode = __lustre_hash_bucket_lookup(lh, lhb, key);
-        if (ehnode) {
-                lh_get(lh, ehnode);
-        } else {
-                __lustre_hash_bucket_add(lh, lhb, hnode);
-                ehnode = hnode;
-                bits = lustre_hash_rehash_bits(lh);
-        }
-        write_unlock(&lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-        if (bits)
-                lustre_hash_rehash(lh, bits);
-
-        RETURN(ehnode);
-}
-
-/**
- * Add item \a hnode to lustre hash \a lh using \a key.  The registered
- * ops->lh_get function will be called if the item was added.
- * Returns 0 on success or -EALREADY on key collisions.
- */
-int
-lustre_hash_add_unique(lustre_hash_t *lh, void *key, struct hlist_node *hnode)
-{
-        struct hlist_node    *ehnode;
-        ENTRY;
-
-        ehnode = lustre_hash_findadd_unique_hnode(lh, key, hnode);
-        if (ehnode != hnode) {
-                lh_put(lh, ehnode);
-                RETURN(-EALREADY);
-        }
-        RETURN(0);
-}
-EXPORT_SYMBOL(lustre_hash_add_unique);
-
-/**
- * Add item \a hnode to lustre hash \a lh using \a key.  If this \a key
- * already exists in the hash then ops->lh_get will be called on the
- * conflicting entry and that entry will be returned to the caller.
- * Otherwise ops->lh_get is called on the item which was added.
- */
-void *
-lustre_hash_findadd_unique(lustre_hash_t *lh, void *key,
-                           struct hlist_node *hnode)
-{
-        struct hlist_node    *ehnode;
-        void                 *obj;
-        ENTRY;
-
-        ehnode = lustre_hash_findadd_unique_hnode(lh, key, hnode);
-        obj = lh_get(lh, ehnode);
-        lh_put(lh, ehnode);
-        RETURN(obj);
-}
-EXPORT_SYMBOL(lustre_hash_findadd_unique);
-
-/**
- * Delete item \a hnode from the lustre hash \a lh using \a key.  The \a key
- * is required to ensure the correct hash bucket is locked since there
- * is no direct linkage from the item to the bucket.  The object
- * removed from the hash will be returned and obs->lh_put is called
- * on the removed object.
- */
-void *
-lustre_hash_del(lustre_hash_t *lh, void *key, struct hlist_node *hnode)
-{
-        lustre_hash_bucket_t *lhb;
-        unsigned              i;
-        void                 *obj;
-        ENTRY;
-
-        __lustre_hash_key_validate(lh, key, hnode);
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-        LASSERT(!hlist_unhashed(hnode));
-
-        write_lock(&lhb->lhb_rwlock);
-        obj = __lustre_hash_bucket_del(lh, lhb, hnode);
-        write_unlock(&lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-
-        RETURN(obj);
-}
-EXPORT_SYMBOL(lustre_hash_del);
-
-/**
- * Delete item given \a key in lustre hash \a lh.  The first \a key found in
- * the hash will be removed, if the key exists multiple times in the hash
- * \a lh this function must be called once per key.  The removed object
- * will be returned and ops->lh_put is called on the removed object.
- */
-void *
-lustre_hash_del_key(lustre_hash_t *lh, void *key)
-{
-        struct hlist_node    *hnode;
-        lustre_hash_bucket_t *lhb;
-        unsigned              i;
-        void                 *obj = NULL;
-        ENTRY;
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-
-        write_lock(&lhb->lhb_rwlock);
-        hnode = __lustre_hash_bucket_lookup(lh, lhb, key);
-        if (hnode)
-                obj = __lustre_hash_bucket_del(lh, lhb, hnode);
-
-        write_unlock(&lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-
-        RETURN(obj);
-}
-EXPORT_SYMBOL(lustre_hash_del_key);
-
-/**
- * Lookup an item using \a key in the lustre hash \a lh and return it.
- * If the \a key is found in the hash lh->lh_get() is called and the
- * matching objects is returned.  It is the callers responsibility
- * to call the counterpart ops->lh_put using the lh_put() macro
- * when when finished with the object.  If the \a key was not found
- * in the hash \a lh NULL is returned.
- */
-void *
-lustre_hash_lookup(lustre_hash_t *lh, void *key)
-{
-        struct hlist_node    *hnode;
-        lustre_hash_bucket_t *lhb;
-        unsigned              i;
-        void                 *obj = NULL;
-        ENTRY;
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-
-        read_lock(&lhb->lhb_rwlock);
-        hnode = __lustre_hash_bucket_lookup(lh, lhb, key);
-        if (hnode)
-                obj = lh_get(lh, hnode);
-
-        read_unlock(&lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-
-        RETURN(obj);
-}
-EXPORT_SYMBOL(lustre_hash_lookup);
-
-/**
- * For each item in the lustre hash \a lh call the passed callback \a func
- * and pass to it as an argument each hash item and the private \a data.
- * Before each callback ops->lh_get will be called, and after each
- * callback ops->lh_put will be called.  Finally, during the callback
- * the bucket lock is held so the callback must never sleep.
- */
-void
-lustre_hash_for_each(lustre_hash_t *lh, lh_for_each_cb func, void *data)
-{
-        struct hlist_node    *hnode;
-        lustre_hash_bucket_t *lhb;
-        void                 *obj;
-        int                   i;
-        ENTRY;
-
-        read_lock(&lh->lh_rwlock);
-        lh_for_each_bucket(lh, lhb, i) {
-                read_lock(&lhb->lhb_rwlock);
-                hlist_for_each(hnode, &(lhb->lhb_head)) {
-                        __lustre_hash_bucket_validate(lh, lhb, hnode);
-                        obj = lh_get(lh, hnode);
-                        func(obj, data);
-                        (void)lh_put(lh, hnode);
-                }
-                read_unlock(&lhb->lhb_rwlock);
-        }
-        read_unlock(&lh->lh_rwlock);
-
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_for_each);
-
-/**
- * For each item in the lustre hash \a lh call the passed callback \a func
- * and pass to it as an argument each hash item and the private \a data.
- * Before each callback ops->lh_get will be called, and after each
- * callback ops->lh_put will be called.  During the callback the
- * bucket lock will not be held will allows for the current item
- * to be removed from the hash during the callback.  However, care
- * should be taken to prevent other callers from operating on the
- * hash concurrently or list corruption may occur.
- */
-void
-lustre_hash_for_each_safe(lustre_hash_t *lh, lh_for_each_cb func, void *data)
-{
-        struct hlist_node    *hnode;
-        struct hlist_node    *pos;
-        lustre_hash_bucket_t *lhb;
-        void                 *obj;
-        int                   i;
-        ENTRY;
-
-        read_lock(&lh->lh_rwlock);
-        lh_for_each_bucket(lh, lhb, i) {
-                read_lock(&lhb->lhb_rwlock);
-                hlist_for_each_safe(hnode, pos, &(lhb->lhb_head)) {
-                        __lustre_hash_bucket_validate(lh, lhb, hnode);
-                        obj = lh_get(lh, hnode);
-                        read_unlock(&lhb->lhb_rwlock);
-                        func(obj, data);
-                        read_lock(&lhb->lhb_rwlock);
-                        (void)lh_put(lh, hnode);
-                }
-                read_unlock(&lhb->lhb_rwlock);
-        }
-        read_unlock(&lh->lh_rwlock);
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_for_each_safe);
-
-/**
- * For each hash bucket in the lustre hash \a lh call the passed callback
- * \a func until all the hash buckets are empty.  The passed callback \a func
- * or the previously registered callback lh->lh_put must remove the item
- * from the hash.  You may either use the lustre_hash_del() or hlist_del()
- * functions.  No rwlocks will be held during the callback \a func it is
- * safe to sleep if needed.  This function will not terminate until the
- * hash is empty.  Note it is still possible to concurrently add new
- * items in to the hash.  It is the callers responsibility to ensure
- * the required locking is in place to prevent concurrent insertions.
- */
-void
-lustre_hash_for_each_empty(lustre_hash_t *lh, lh_for_each_cb func, void *data)
-{
-        struct hlist_node    *hnode;
-        lustre_hash_bucket_t *lhb;
-        void                 *obj;
-        int                   i;
-        ENTRY;
-
-restart:
-        read_lock(&lh->lh_rwlock);
-        lh_for_each_bucket(lh, lhb, i) {
-                write_lock(&lhb->lhb_rwlock);
-                while (!hlist_empty(&lhb->lhb_head)) {
-                        hnode =  lhb->lhb_head.first;
-                        __lustre_hash_bucket_validate(lh, lhb, hnode);
-                        obj = lh_get(lh, hnode);
-                        write_unlock(&lhb->lhb_rwlock);
-                        read_unlock(&lh->lh_rwlock);
-                        func(obj, data);
-                        (void)lh_put(lh, hnode);
-                        goto restart;
-                }
-                write_unlock(&lhb->lhb_rwlock);
-        }
-        read_unlock(&lh->lh_rwlock);
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_for_each_empty);
-
-/*
- * For each item in the lustre hash \a lh which matches the \a key call
- * the passed callback \a func and pass to it as an argument each hash
- * item and the private \a data.  Before each callback ops->lh_get will
- * be called, and after each callback ops->lh_put will be called.
- * Finally, during the callback the bucket lock is held so the
- * callback must never sleep.
-   */
-void
-lustre_hash_for_each_key(lustre_hash_t *lh, void *key,
-                         lh_for_each_cb func, void *data)
-{
-        struct hlist_node    *hnode;
-        lustre_hash_bucket_t *lhb;
-        unsigned              i;
-        ENTRY;
-
-        read_lock(&lh->lh_rwlock);
-        i = lh_hash(lh, key, lh->lh_cur_mask);
-        lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-
-        read_lock(&lhb->lhb_rwlock);
-        hlist_for_each(hnode, &(lhb->lhb_head)) {
-                __lustre_hash_bucket_validate(lh, lhb, hnode);
-
-                if (!lh_compare(lh, key, hnode))
-                        continue;
-
-                func(lh_get(lh, hnode), data);
-                (void)lh_put(lh, hnode);
-        }
-
-        read_unlock(&lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_for_each_key);
-
-/**
- * Rehash the lustre hash \a lh to the given \a bits.  This can be used
- * to grow the hash size when excessive chaining is detected, or to
- * shrink the hash when it is larger than needed.  When the LH_REHASH
- * flag is set in \a lh the lustre hash may be dynamically rehashed
- * during addition or removal if the hash's theta value exceeds
- * either the lh->lh_min_theta or lh->max_theta values.  By default
- * these values are tuned to keep the chained hash depth small, and
- * this approach assumes a reasonably uniform hashing function.  The
- * theta thresholds for \a lh are tunable via lustre_hash_set_theta().
- */
-int
-lustre_hash_rehash(lustre_hash_t *lh, int bits)
-{
-        struct hlist_node     *hnode;
-        struct hlist_node     *pos;
-        lustre_hash_bucket_t  *lh_buckets;
-        lustre_hash_bucket_t  *rehash_buckets;
-        lustre_hash_bucket_t  *lh_lhb;
-        lustre_hash_bucket_t  *rehash_lhb;
-        int                    i;
-        int                    theta;
-        int                    lh_mask;
-        int                    lh_bits;
-        int                    mask = (1 << bits) - 1;
-        void                  *key;
-        ENTRY;
-
-        LASSERT(!in_interrupt());
-        LASSERT(mask > 0);
-
-        OBD_VMALLOC(rehash_buckets, sizeof(*rehash_buckets) << bits);
-        if (!rehash_buckets)
-                RETURN(-ENOMEM);
-
-        for (i = 0; i <= mask; i++) {
-                INIT_HLIST_HEAD(&rehash_buckets[i].lhb_head);
-                rwlock_init(&rehash_buckets[i].lhb_rwlock);
-                atomic_set(&rehash_buckets[i].lhb_count, 0);
-        }
-
-        write_lock(&lh->lh_rwlock);
-
-        /*
-         * Early return for multiple concurrent racing callers,
-         * ensure we only trigger the rehash if it is still needed.
-         */
-        theta = __lustre_hash_theta(lh);
-        if ((theta >= lh->lh_min_theta) && (theta <= lh->lh_max_theta)) {
-                OBD_VFREE(rehash_buckets, sizeof(*rehash_buckets) << bits);
-                write_unlock(&lh->lh_rwlock);
-                RETURN(-EALREADY);
-        }
-
-        lh_bits = lh->lh_cur_bits;
-        lh_buckets = lh->lh_buckets;
-        lh_mask = (1 << lh_bits) - 1;
-
-        lh->lh_cur_bits = bits;
-        lh->lh_cur_mask = (1 << bits) - 1;
-        lh->lh_buckets = rehash_buckets;
-        atomic_inc(&lh->lh_rehash_count);
-
-        for (i = 0; i <= lh_mask; i++) {
-                lh_lhb = &lh_buckets[i];
-
-                write_lock(&lh_lhb->lhb_rwlock);
-                hlist_for_each_safe(hnode, pos, &(lh_lhb->lhb_head)) {
-                        key = lh_key(lh, hnode);
-                        LASSERT(key);
-
-                        /*
-                         * Validate hnode is in the correct bucket.
-                         */
-                        if (unlikely(lh->lh_flags & LH_DEBUG))
-                                LASSERT(lh_hash(lh, key, lh_mask) == i);
-
-                        /*
-                         * Delete from old hash bucket.
-                         */
-                        hlist_del(hnode);
-                        LASSERT(atomic_read(&lh_lhb->lhb_count) > 0);
-                        atomic_dec(&lh_lhb->lhb_count);
-
-                        /*
-                         * Add to rehash bucket, ops->lh_key must be defined.
-                         */
-                        rehash_lhb = &rehash_buckets[lh_hash(lh, key, mask)];
-                        hlist_add_head(hnode, &(rehash_lhb->lhb_head));
-                        atomic_inc(&rehash_lhb->lhb_count);
-                }
-
-                LASSERT(hlist_empty(&(lh_lhb->lhb_head)));
-                LASSERT(atomic_read(&lh_lhb->lhb_count) == 0);
-                write_unlock(&lh_lhb->lhb_rwlock);
-        }
-
-        OBD_VFREE(lh_buckets, sizeof(*lh_buckets) << lh_bits);
-        write_unlock(&lh->lh_rwlock);
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(lustre_hash_rehash);
-
-/**
- * Rehash the object referenced by \a hnode in the lustre hash \a lh.  The
- * \a old_key must be provided to locate the objects previous location
- * in the hash, and the \a new_key will be used to reinsert the object.
- * Use this function instead of a lustre_hash_add() + lustre_hash_del()
- * combo when it is critical that there is no window in time where the
- * object is missing from the hash.  When an object is being rehashed
- * the registered lh_get() and lh_put() functions will not be called.
- */
-void lustre_hash_rehash_key(lustre_hash_t *lh, void *old_key, void *new_key,
-                            struct hlist_node *hnode)
-{
-        lustre_hash_bucket_t  *old_lhb;
-        lustre_hash_bucket_t  *new_lhb;
-        unsigned               i;
-        unsigned               j;
-        ENTRY;
-
-        __lustre_hash_key_validate(lh, new_key, hnode);
-        LASSERT(!hlist_unhashed(hnode));
-
-        read_lock(&lh->lh_rwlock);
-
-        i = lh_hash(lh, old_key, lh->lh_cur_mask);
-        old_lhb = &lh->lh_buckets[i];
-        LASSERT(i <= lh->lh_cur_mask);
-
-        j = lh_hash(lh, new_key, lh->lh_cur_mask);
-        new_lhb = &lh->lh_buckets[j];
-        LASSERT(j <= lh->lh_cur_mask);
-
-        if (i < j) { /* write_lock ordering */
-                write_lock(&old_lhb->lhb_rwlock);
-                write_lock(&new_lhb->lhb_rwlock);
-        } else if (i > j) {
-                write_lock(&new_lhb->lhb_rwlock);
-                write_lock(&old_lhb->lhb_rwlock);
-        } else { /* do nothing */
-                read_unlock(&lh->lh_rwlock);
-                EXIT;
-                return;
-        }
-
-        /*
-         * Migrate item between hash buckets without calling
-         * the lh_get() and lh_put() callback functions.
-         */
-        hlist_del(hnode);
-        LASSERT(atomic_read(&old_lhb->lhb_count) > 0);
-        atomic_dec(&old_lhb->lhb_count);
-        hlist_add_head(hnode, &(new_lhb->lhb_head));
-        atomic_inc(&new_lhb->lhb_count);
-
-        write_unlock(&new_lhb->lhb_rwlock);
-        write_unlock(&old_lhb->lhb_rwlock);
-        read_unlock(&lh->lh_rwlock);
-
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_rehash_key);
-
-int lustre_hash_debug_header(char *str, int size)
-{
-        return snprintf(str, size,
-                 "%-*s%6s%6s%6s%6s%6s%6s%6s%7s%6s%s\n", LUSTRE_MAX_HASH_NAME,
-                 "name", "cur", "min", "max", "theta", "t-min", "t-max",
-                 "flags", "rehash", "count", " distribution");
-}
-EXPORT_SYMBOL(lustre_hash_debug_header);
-
-int lustre_hash_debug_str(lustre_hash_t *lh, char *str, int size)
-{
-        lustre_hash_bucket_t  *lhb;
-        int                    theta;
-        int                    i;
-        int                    c = 0;
-        int                    dist[8] = { 0, };
-
-        if (str == NULL || size == 0)
-                return 0;
-
-        read_lock(&lh->lh_rwlock);
-        theta = __lustre_hash_theta(lh);
-
-        c += snprintf(str + c, size - c, "%-*s ",
-                      LUSTRE_MAX_HASH_NAME, lh->lh_name);
-        c += snprintf(str + c, size - c, "%5d ",  1 << lh->lh_cur_bits);
-        c += snprintf(str + c, size - c, "%5d ",  1 << lh->lh_min_bits);
-        c += snprintf(str + c, size - c, "%5d ",  1 << lh->lh_max_bits);
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __lustre_hash_theta_int(theta),
-                      __lustre_hash_theta_frac(theta));
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __lustre_hash_theta_int(lh->lh_min_theta),
-                      __lustre_hash_theta_frac(lh->lh_min_theta));
-        c += snprintf(str + c, size - c, "%d.%03d ",
-                      __lustre_hash_theta_int(lh->lh_max_theta),
-                      __lustre_hash_theta_frac(lh->lh_max_theta));
-        c += snprintf(str + c, size - c, " 0x%02x ", lh->lh_flags);
-        c += snprintf(str + c, size - c, "%6d ",
-                      atomic_read(&lh->lh_rehash_count));
-        c += snprintf(str + c, size - c, "%5d ",
-                      atomic_read(&lh->lh_count));
-
-        /*
-         * The distribution is a summary of the chained hash depth in
-         * each of the lustre hash buckets.  Each buckets lhb_count is
-         * divided by the hash theta value and used to generate a
-         * histogram of the hash distribution.  A uniform hash will
-         * result in all hash buckets being close to the average thus
-         * only the first few entries in the histogram will be non-zero.
-         * If you hash function results in a non-uniform hash the will
-         * be observable by outlier bucks in the distribution histogram.
-         *
-         * Uniform hash distribution:      128/128/0/0/0/0/0/0
-         * Non-Uniform hash distribution:  128/125/0/0/0/0/2/1
-         */
-        lh_for_each_bucket(lh, lhb, i)
-                dist[min(__fls(atomic_read(&lhb->lhb_count)/max(theta,1)),7)]++;
-
-        for (i = 0; i < 8; i++)
-                c += snprintf(str + c, size - c, "%d%c",  dist[i],
-                              (i == 7) ? '\n' : '/');
-
-        read_unlock(&lh->lh_rwlock);
-
-        return c;
-}
-EXPORT_SYMBOL(lustre_hash_debug_str);
index f1302dd..29571c7 100644 (file)
 #include <lustre_debug.h>
 #include <lustre_net.h>
 
-int dump_ioo(struct obd_ioobj *ioo)
+void dump_lniobuf(struct niobuf_local *nb)
 {
-        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"/%u, len=%d, page=%p, rc=%d\n",
-               nb->file_offset, (unsigned)nb->page_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;
+        CDEBUG(D_RPCTRACE,
+               "niobuf_local: offset="LPD64", len=%d, page=%p, rc=%d\n",
+               nb->page_offset, nb->len, nb->page, nb->rc);
+        CDEBUG(D_RPCTRACE, "nb->page: index = %ld\n",
+               nb->page ? cfs_page_index(nb->page) : -1);
 }
+EXPORT_SYMBOL(dump_lniobuf);
 
 void dump_lsm(int level, struct lov_stripe_md *lsm)
 {
@@ -124,22 +71,6 @@ void dump_lsm(int level, struct lov_stripe_md *lsm)
                lsm->lsm_pool_name);
 }
 
-/* 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)
 {
@@ -193,11 +124,7 @@ int block_debug_check(char *who, void *addr, int end, __u64 off, __u64 id)
 }
 #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);
index 1f9c9b1..9c20af2 100644 (file)
@@ -46,7 +46,6 @@
 #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;
@@ -62,7 +61,8 @@ spinlock_t        obd_zombie_impexp_lock;
 static void obd_zombie_impexp_notify(void);
 static void obd_zombie_export_add(struct obd_export *exp);
 static void obd_zombie_import_add(struct obd_import *imp);
-static void print_export_data(struct obd_export *exp, const char *status);
+static void print_export_data(struct obd_export *exp,
+                              const char *status, int locks);
 
 int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
 
@@ -785,6 +785,10 @@ struct obd_export *class_new_export(struct obd_device *obd,
         atomic_set(&export->exp_rpc_count, 0);
         atomic_set(&export->exp_cb_count, 0);
         atomic_set(&export->exp_locks_count, 0);
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        CFS_INIT_LIST_HEAD(&export->exp_locks_list);
+        spin_lock_init(&export->exp_locks_list_guard);
+#endif
         atomic_set(&export->exp_replay_count, 0);
         export->exp_obd = obd;
         CFS_INIT_LIST_HEAD(&export->exp_outstanding_replies);
@@ -810,8 +814,8 @@ struct obd_export *class_new_export(struct obd_device *obd,
                 GOTO(exit_err, rc = -ENODEV);
 
         if (!obd_uuid_equals(cluuid, &obd->obd_uuid)) {
-                rc = lustre_hash_add_unique(obd->obd_uuid_hash, cluuid,
-                                            &export->exp_uuid_hash);
+                rc = cfs_hash_add_unique(obd->obd_uuid_hash, cluuid,
+                                         &export->exp_uuid_hash);
                 if (rc != 0) {
                         LCONSOLE_WARN("%s: denying duplicate export for %s, %d\n",
                                       obd->obd_name, cluuid->uuid, rc);
@@ -844,9 +848,9 @@ void class_unlink_export(struct obd_export *exp)
         spin_lock(&exp->exp_obd->obd_dev_lock);
         /* delete an uuid-export hashitem from hashtables */
         if (!hlist_unhashed(&exp->exp_uuid_hash))
-                lustre_hash_del(exp->exp_obd->obd_uuid_hash,
-                                &exp->exp_client_uuid,
-                                &exp->exp_uuid_hash);
+                cfs_hash_del(exp->exp_obd->obd_uuid_hash,
+                             &exp->exp_client_uuid,
+                             &exp->exp_uuid_hash);
 
         list_move(&exp->exp_obd_chain, &exp->exp_obd->obd_unlinked_exports);
         list_del_init(&exp->exp_obd_chain_timed);
@@ -985,6 +989,49 @@ void class_destroy_import(struct obd_import *import)
 }
 EXPORT_SYMBOL(class_destroy_import);
 
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+
+void __class_export_add_lock_ref(struct obd_export *exp, struct ldlm_lock *lock)
+{
+        spin_lock(&exp->exp_locks_list_guard);
+
+        LASSERT(lock->l_exp_refs_nr >= 0);
+
+        if (lock->l_exp_refs_target != NULL &&
+            lock->l_exp_refs_target != exp) {
+                LCONSOLE_WARN("setting export %p for lock %p which already has export %p\n",
+                              exp, lock, lock->l_exp_refs_target);
+        }
+        if ((lock->l_exp_refs_nr ++) == 0) {
+                list_add(&lock->l_exp_refs_link, &exp->exp_locks_list);
+                lock->l_exp_refs_target = exp;
+        }
+        CDEBUG(D_INFO, "lock = %p, export = %p, refs = %u\n",
+               lock, exp, lock->l_exp_refs_nr);
+        spin_unlock(&exp->exp_locks_list_guard);
+}
+EXPORT_SYMBOL(__class_export_add_lock_ref);
+
+void __class_export_del_lock_ref(struct obd_export *exp, struct ldlm_lock *lock)
+{
+        spin_lock(&exp->exp_locks_list_guard);
+        LASSERT(lock->l_exp_refs_nr > 0);
+        if (lock->l_exp_refs_target != exp) {
+                LCONSOLE_WARN("lock %p, "
+                              "mismatching export pointers: %p, %p\n",
+                              lock, lock->l_exp_refs_target, exp);
+        }
+        if (-- lock->l_exp_refs_nr == 0) {
+                list_del_init(&lock->l_exp_refs_link);
+                lock->l_exp_refs_target = NULL;
+        }
+        CDEBUG(D_INFO, "lock = %p, export = %p, refs = %u\n",
+               lock, exp, lock->l_exp_refs_nr);
+        spin_unlock(&exp->exp_locks_list_guard);
+}
+EXPORT_SYMBOL(__class_export_del_lock_ref);
+#endif
+
 /* 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
@@ -1079,9 +1126,9 @@ int class_disconnect(struct obd_export *export)
                export->exp_handle.h_cookie);
 
         if (!hlist_unhashed(&export->exp_nid_hash))
-                lustre_hash_del(export->exp_obd->obd_nid_hash,
-                                &export->exp_connection->c_peer.nid,
-                                &export->exp_nid_hash);
+                cfs_hash_del(export->exp_obd->obd_nid_hash,
+                             &export->exp_connection->c_peer.nid,
+                             &export->exp_nid_hash);
 
         class_export_recovery_cleanup(export);
         class_unlink_export(export);
@@ -1090,6 +1137,20 @@ no_disconn:
         RETURN(0);
 }
 
+/* Return non-zero for a fully connected export */
+int class_connected_export(struct obd_export *exp)
+{
+        if (exp) {
+                int connected;
+                spin_lock(&exp->exp_lock);
+                connected = (exp->exp_conn_cnt > 0);
+                spin_unlock(&exp->exp_lock);
+                return connected;
+        }
+        return 0;
+}
+EXPORT_SYMBOL(class_connected_export);
+
 static void class_disconnect_export_list(struct list_head *list,
                                          enum obd_option flags)
 {
@@ -1188,7 +1249,7 @@ void class_disconnect_stale_exports(struct obd_device *obd,
                        obd->obd_name, exp->exp_client_uuid.uuid,
                        exp->exp_connection == NULL ? "<unknown>" :
                        libcfs_nid2str(exp->exp_connection->c_peer.nid));
-                print_export_data(exp, "EVICTING");
+                print_export_data(exp, "EVICTING", 0);
         }
         spin_unlock(&obd->obd_dev_lock);
 
@@ -1254,7 +1315,7 @@ int obd_export_evict_by_nid(struct obd_device *obd, const char *nid)
         lnet_nid_t nid_key = libcfs_str2nid((char *)nid);
 
         do {
-                doomed_exp = lustre_hash_lookup(obd->obd_nid_hash, &nid_key);
+                doomed_exp = cfs_hash_lookup(obd->obd_nid_hash, &nid_key);
                 if (doomed_exp == NULL)
                         break;
 
@@ -1291,7 +1352,7 @@ int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)
                 return exports_evicted;
         }
 
-        doomed_exp = lustre_hash_lookup(obd->obd_uuid_hash, &doomed_uuid);
+        doomed_exp = cfs_hash_lookup(obd->obd_uuid_hash, &doomed_uuid);
 
         if (doomed_exp == NULL) {
                 CERROR("%s: can't disconnect %s: no exports found\n",
@@ -1308,7 +1369,13 @@ int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)
 }
 EXPORT_SYMBOL(obd_export_evict_by_uuid);
 
-static void print_export_data(struct obd_export *exp, const char *status)
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+void (*class_export_dump_hook)(struct obd_export*) = NULL;
+EXPORT_SYMBOL(class_export_dump_hook);
+#endif
+
+static void print_export_data(struct obd_export *exp, const char *status,
+                              int locks)
 {
         struct ptlrpc_reply_state *rs;
         struct ptlrpc_reply_state *first_reply = NULL;
@@ -1331,23 +1398,27 @@ static void print_export_data(struct obd_export *exp, const char *status)
                exp->exp_disconnected, exp->exp_delayed, exp->exp_failed,
                nreplies, first_reply, nreplies > 3 ? "..." : "",
                exp->exp_last_committed);
+#if LUSTRE_TRACKS_LOCK_EXP_REFS
+        if (locks && class_export_dump_hook != NULL)
+                class_export_dump_hook(exp);
+#endif
 }
 
-void dump_exports(struct obd_device *obd)
+void dump_exports(struct obd_device *obd, int locks)
 {
         struct obd_export *exp;
 
         spin_lock(&obd->obd_dev_lock);
         list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain)
-                print_export_data(exp, "ACTIVE");
+                print_export_data(exp, "ACTIVE", locks);
         list_for_each_entry(exp, &obd->obd_unlinked_exports, exp_obd_chain)
-                print_export_data(exp, "UNLINKED");
+                print_export_data(exp, "UNLINKED", locks);
         list_for_each_entry(exp, &obd->obd_delayed_exports, exp_obd_chain)
-                print_export_data(exp, "DELAYED");
+                print_export_data(exp, "DELAYED", locks);
         spin_unlock(&obd->obd_dev_lock);
         spin_lock(&obd_zombie_impexp_lock);
         list_for_each_entry(exp, &obd_zombie_exports, exp_obd_chain)
-                print_export_data(exp, "ZOMBIE");
+                print_export_data(exp, "ZOMBIE", locks);
         spin_unlock(&obd_zombie_impexp_lock);
 }
 EXPORT_SYMBOL(dump_exports);
@@ -1366,7 +1437,7 @@ void obd_exports_barrier(struct obd_device *obd)
                                       "The obd refcount = %d. Is it stuck?\n",
                                       obd->obd_name, waited,
                                       atomic_read(&obd->obd_refcount));
-                        dump_exports(obd);
+                        dump_exports(obd, 0);
                 }
                 waited *= 2;
                 spin_lock(&obd->obd_dev_lock);
index 8c49fc7..41ee78a 100644 (file)
@@ -215,7 +215,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail)
                 __swab32s(&lid->lid_id.lgl_ogen);
                 break;
         }
-        case LLOG_JOIN_REC:
         case LLOG_PAD_MAGIC:
                 break;
 
index fbcf034..c25a66c 100644 (file)
@@ -634,9 +634,8 @@ int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, int count,
 
         LPROCFS_CLIMP_CHECK(obd);
         conn = obd->u.cli.cl_import->imp_connection;
-        LASSERT(conn != NULL);
         *eof = 1;
-        if (obd->u.cli.cl_import) {
+        if (conn && obd->u.cli.cl_import) {
                 rc = snprintf(page, count, "%s\n",
                               conn->c_remote_uuid.uuid);
         } else {
@@ -732,11 +731,11 @@ static const char *obd_connect_names[] = {
         "truncate_lock",
         "initial_transno",
         "inode_bit_locks",
-        "join_file",
+        "join_file(obsolete)",
         "getattr_by_fid",
         "no_oh_for_devices",
-        "local_client",
         "remote_client",
+        "remote_client_by_force",
         "max_byte_per_rpc",
         "64bit_qdata",
         "mds_capability",
@@ -1403,7 +1402,6 @@ void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats)
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, checkmd);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, precreate);
         LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
@@ -1650,8 +1648,8 @@ int lprocfs_exp_rd_uuid(char *page, char **start, off_t off, int count,
         *eof = 1;
         page[0] = '\0';
         lprocfs_exp_rd_cb_data_init(&cb_data, page, count, eof, &len);
-        lustre_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
-                                 lprocfs_exp_print_uuid, &cb_data);
+        cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
+                              lprocfs_exp_print_uuid, &cb_data);
         return (*cb_data.len);
 }
 
@@ -1659,16 +1657,16 @@ void lprocfs_exp_print_hash(void *obj, void *cb_data)
 {
         struct exp_uuid_cb_data *data = cb_data;
         struct obd_export       *exp = obj;
-        lustre_hash_t           *lh;
+        cfs_hash_t              *hs;
 
-        lh = exp->exp_lock_hash;
-        if (lh) {
+        hs = exp->exp_lock_hash;
+        if (hs) {
                 if (!*data->len)
-                        *data->len += lustre_hash_debug_header(data->page,
-                                                               data->count);
+                        *data->len += cfs_hash_debug_header(data->page,
+                                                            data->count);
 
-                *data->len += lustre_hash_debug_str(lh, data->page + *data->len,
-                                                    data->count);
+                *data->len += cfs_hash_debug_str(hs, data->page + *data->len,
+                                                 data->count);
         }
 }
 
@@ -1684,8 +1682,8 @@ int lprocfs_exp_rd_hash(char *page, char **start, off_t off, int count,
         page[0] = '\0';
         lprocfs_exp_rd_cb_data_init(&cb_data, page, count, eof, &len);
 
-        lustre_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
-                                 lprocfs_exp_print_hash, &cb_data);
+        cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
+                              lprocfs_exp_print_hash, &cb_data);
         return (*cb_data.len);
 }
 
@@ -1735,8 +1733,8 @@ int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
         struct nid_stat *client_stat;
         CFS_LIST_HEAD(free_list);
 
-        lustre_hash_for_each(obd->obd_nid_stats_hash,
-                             lprocfs_nid_stats_clear_write_cb, &free_list);
+        cfs_hash_for_each(obd->obd_nid_stats_hash,
+                          lprocfs_nid_stats_clear_write_cb, &free_list);
 
         while (!list_empty(&free_list)) {
                 client_stat = list_entry(free_list.next, struct nid_stat,
@@ -1781,8 +1779,8 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid)
         new_stat->nid_obd           = exp->exp_obd;
         atomic_set(&new_stat->nid_exp_ref_count, 0);
 
-        old_stat = lustre_hash_findadd_unique(obd->obd_nid_stats_hash,
-                                              nid, &new_stat->nid_hash);
+        old_stat = cfs_hash_findadd_unique(obd->obd_nid_stats_hash,
+                                           nid, &new_stat->nid_hash);
         CDEBUG(D_INFO, "Found stats %p for nid %s - ref %d\n",
                old_stat, libcfs_nid2str(*nid),
                atomic_read(&new_stat->nid_exp_ref_count));
@@ -1796,7 +1794,7 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid)
                                 nidstat_putref(exp->exp_nid_stats);
                         exp->exp_nid_stats = old_stat;
                 } else {
-                        /* lustre_hash_findadd_unique() has added
+                        /* cfs_hash_findadd_unique() has added
                          * old_stat's refcount */
                         nidstat_putref(old_stat);
                 }
@@ -1846,7 +1844,7 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid)
 destroy_new_ns:
         if (new_stat->nid_proc != NULL)
                 lprocfs_remove(&new_stat->nid_proc);
-        lustre_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash);
+        cfs_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash);
 
 destroy_new:
         OBD_FREE_PTR(new_stat);
@@ -2111,10 +2109,10 @@ int lprocfs_obd_rd_hash(char *page, char **start, off_t off,
         if (obd == NULL)
                 return 0;
 
-        c += lustre_hash_debug_header(page, count);
-        c += lustre_hash_debug_str(obd->obd_uuid_hash, page + c, count - c);
-        c += lustre_hash_debug_str(obd->obd_nid_hash, page + c, count - c);
-        c += lustre_hash_debug_str(obd->obd_nid_stats_hash, page+c, count-c);
+        c += cfs_hash_debug_header(page, count);
+        c += cfs_hash_debug_str(obd->obd_uuid_hash, page + c, count - c);
+        c += cfs_hash_debug_str(obd->obd_nid_hash, page + c, count - c);
+        c += cfs_hash_debug_str(obd->obd_nid_stats_hash, page+c, count-c);
 
         return c;
 }
index 342b34e..b8b07ba 100644 (file)
@@ -220,6 +220,8 @@ void class_handle_free_cb(struct rcu_head *rcu)
 int class_handle_init(void)
 {
         struct handle_bucket *bucket;
+        struct timeval tv;
+        int seed[2];
 
         LASSERT(handle_hash == NULL);
 
@@ -233,6 +235,12 @@ int class_handle_init(void)
                 CFS_INIT_LIST_HEAD(&bucket->head);
                 spin_lock_init(&bucket->lock);
         }
+
+        /** bug 21430: add randomness to the initial base */
+        ll_get_random_bytes(seed, sizeof(seed));
+        do_gettimeofday(&tv);
+        ll_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]);
+
         ll_get_random_bytes(&handle_base, sizeof(handle_base));
         LASSERT(handle_base != 0ULL);
 
index 57d8761..f573ade 100644 (file)
 #include <lprocfs_status.h>
 #include <libcfs/list.h>
 #include <lustre_param.h>
-#include <class_hash.h>
 
-static lustre_hash_ops_t uuid_hash_ops;
-static lustre_hash_ops_t nid_hash_ops;
-static lustre_hash_ops_t nid_stat_hash_ops;
+static cfs_hash_ops_t uuid_hash_ops;
+static cfs_hash_ops_t nid_hash_ops;
+static cfs_hash_ops_t nid_stat_hash_ops;
 
 /*********** string parsing utils *********/
 
@@ -268,6 +267,7 @@ int class_attach(struct lustre_cfg *lcfg)
         obd->obd_osfs_age = cfs_time_shift_64(-1000);
 
         /* XXX belongs in setup not attach  */
+        init_rwsem(&obd->obd_observer_link_sem);
         /* recovery data */
         cfs_init_timer(&obd->obd_recovery_timer);
         spin_lock_init(&obd->obd_processing_task_lock);
@@ -355,26 +355,26 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
         spin_unlock(&obd->obd_dev_lock);
 
         /* create an uuid-export lustre hash */
-        obd->obd_uuid_hash = lustre_hash_init("UUID_HASH",
-                                              HASH_UUID_CUR_BITS,
-                                              HASH_UUID_MAX_BITS,
-                                              &uuid_hash_ops, 0);
+        obd->obd_uuid_hash = cfs_hash_create("UUID_HASH",
+                                             HASH_UUID_CUR_BITS,
+                                             HASH_UUID_CUR_BITS,
+                                             &uuid_hash_ops, 0);
         if (!obd->obd_uuid_hash)
                 GOTO(err_hash, err = -ENOMEM);
 
         /* create a nid-export lustre hash */
-        obd->obd_nid_hash = lustre_hash_init("NID_HASH",
-                                             HASH_NID_CUR_BITS,
-                                             HASH_NID_MAX_BITS,
-                                             &nid_hash_ops, 0);
+        obd->obd_nid_hash = cfs_hash_create("NID_HASH",
+                                            HASH_NID_CUR_BITS,
+                                            HASH_NID_CUR_BITS,
+                                            &nid_hash_ops, 0);
         if (!obd->obd_nid_hash)
                 GOTO(err_hash, err = -ENOMEM);
 
         /* create a nid-stats lustre hash */
-        obd->obd_nid_stats_hash = lustre_hash_init("NID_STATS",
-                                                   HASH_NID_STATS_CUR_BITS,
-                                                   HASH_NID_STATS_MAX_BITS,
-                                                   &nid_stat_hash_ops, 0);
+        obd->obd_nid_stats_hash = cfs_hash_create("NID_STATS",
+                                                  HASH_NID_STATS_CUR_BITS,
+                                                  HASH_NID_STATS_CUR_BITS,
+                                                  &nid_stat_hash_ops, 0);
         if (!obd->obd_nid_stats_hash)
                 GOTO(err_hash, err = -ENOMEM);
 
@@ -408,15 +408,15 @@ err_exp:
         }
 err_hash:
         if (obd->obd_uuid_hash) {
-                lustre_hash_exit(obd->obd_uuid_hash);
+                cfs_hash_destroy(obd->obd_uuid_hash);
                 obd->obd_uuid_hash = NULL;
         }
         if (obd->obd_nid_hash) {
-                lustre_hash_exit(obd->obd_nid_hash);
+                cfs_hash_destroy(obd->obd_nid_hash);
                 obd->obd_nid_hash = NULL;
         }
         if (obd->obd_nid_stats_hash) {
-                lustre_hash_exit(obd->obd_nid_stats_hash);
+                cfs_hash_destroy(obd->obd_nid_stats_hash);
                 obd->obd_nid_stats_hash = NULL;
         }
         obd->obd_starting = 0;
@@ -513,25 +513,25 @@ int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
                    by other things as well, so don't count on it. */
                 CDEBUG(D_IOCTL, "%s: forcing exports to disconnect: %d\n",
                        obd->obd_name, atomic_read(&obd->obd_refcount) - 3);
-                dump_exports(obd);
+                dump_exports(obd, 0);
                 class_disconnect_exports(obd);
         }
 
         /* destroy an uuid-export hash body */
         if (obd->obd_uuid_hash) {
-                lustre_hash_exit(obd->obd_uuid_hash);
+                cfs_hash_destroy(obd->obd_uuid_hash);
                 obd->obd_uuid_hash = NULL;
         }
 
         /* destroy a nid-export hash body */
         if (obd->obd_nid_hash) {
-                lustre_hash_exit(obd->obd_nid_hash);
+                cfs_hash_destroy(obd->obd_nid_hash);
                 obd->obd_nid_hash = NULL;
         }
 
         /* destroy a nid-stats hash body */
         if (obd->obd_nid_stats_hash) {
-                lustre_hash_exit(obd->obd_nid_stats_hash);
+                cfs_hash_destroy(obd->obd_nid_stats_hash);
                 obd->obd_nid_stats_hash = NULL;
         }
 
@@ -1423,10 +1423,10 @@ out:
  */
 
 static unsigned
-uuid_hash(lustre_hash_t *lh,  void *key, unsigned mask)
+uuid_hash(cfs_hash_t *hs,  void *key, unsigned mask)
 {
-        return lh_djb2_hash(((struct obd_uuid *)key)->uuid,
-                            sizeof(((struct obd_uuid *)key)->uuid), mask);
+        return cfs_hash_djb2_hash(((struct obd_uuid *)key)->uuid,
+                                  sizeof(((struct obd_uuid *)key)->uuid), mask);
 }
 
 static void *
@@ -1477,12 +1477,12 @@ uuid_export_put(struct hlist_node *hnode)
         RETURN(exp);
 }
 
-static lustre_hash_ops_t uuid_hash_ops = {
-        .lh_hash    = uuid_hash,
-        .lh_key     = uuid_key,
-        .lh_compare = uuid_compare,
-        .lh_get     = uuid_export_get,
-        .lh_put     = uuid_export_put,
+static cfs_hash_ops_t uuid_hash_ops = {
+        .hs_hash    = uuid_hash,
+        .hs_key     = uuid_key,
+        .hs_compare = uuid_compare,
+        .hs_get     = uuid_export_get,
+        .hs_put     = uuid_export_put,
 };
 
 
@@ -1491,9 +1491,9 @@ static lustre_hash_ops_t uuid_hash_ops = {
  */
 
 static unsigned
-nid_hash(lustre_hash_t *lh,  void *key, unsigned mask)
+nid_hash(cfs_hash_t *hs,  void *key, unsigned mask)
 {
-        return lh_djb2_hash(key, sizeof(lnet_nid_t), mask);
+        return cfs_hash_djb2_hash(key, sizeof(lnet_nid_t), mask);
 }
 
 static void *
@@ -1544,12 +1544,12 @@ nid_export_put(struct hlist_node *hnode)
         RETURN(exp);
 }
 
-static lustre_hash_ops_t nid_hash_ops = {
-        .lh_hash    = nid_hash,
-        .lh_key     = nid_key,
-        .lh_compare = nid_compare,
-        .lh_get     = nid_export_get,
-        .lh_put     = nid_export_put,
+static cfs_hash_ops_t nid_hash_ops = {
+        .hs_hash    = nid_hash,
+        .hs_key     = nid_key,
+        .hs_compare = nid_compare,
+        .hs_get     = nid_export_get,
+        .hs_put     = nid_export_put,
 };
 
 
@@ -1595,10 +1595,10 @@ nidstats_put(struct hlist_node *hnode)
         RETURN(ns);
 }
 
-static lustre_hash_ops_t nid_stat_hash_ops = {
-        .lh_hash    = nid_hash,
-        .lh_key     = nidstats_key,
-        .lh_compare = nidstats_compare,
-        .lh_get     = nidstats_get,
-        .lh_put     = nidstats_put,
+static cfs_hash_ops_t nid_stat_hash_ops = {
+        .hs_hash    = nid_hash,
+        .hs_key     = nidstats_key,
+        .hs_compare = nidstats_compare,
+        .hs_get     = nidstats_get,
+        .hs_put     = nidstats_put,
 };
index 2c16c77..54780fe 100644 (file)
@@ -2537,6 +2537,9 @@ struct file_system_type lustre_fs_type = {
         .get_sb       = lustre_get_sb,
         .kill_sb      = lustre_kill_super,
         .fs_flags     = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV |
+#ifdef FS_HAS_FIEMAP
+                        FS_HAS_FIEMAP |
+#endif
                         LL_RENAME_DOES_D_MOVE,
 };
 
index 136481b..53587ba 100644 (file)
@@ -566,8 +566,8 @@ static int echo_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
         rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, LDLM_PLAIN,
                                     NULL, LCK_NL, &lock_flags, NULL,
-                                    ldlm_completion_ast, NULL, NULL,
-                                    0, NULL, NULL, &obd->u.echo.eo_nl_lock);
+                                    ldlm_completion_ast, NULL, NULL, 0, NULL,
+                                    &obd->u.echo.eo_nl_lock);
         LASSERT (rc == ELDLM_OK);
 
         lprocfs_echo_init_vars(&lvars);
index 3fcfdbc..3f54f2e 100644 (file)
@@ -90,6 +90,7 @@ struct echo_lock {
         struct list_head       el_chain;
         struct echo_object    *el_object;
         __u64                  el_cookie;
+        atomic_t               el_refcount;
 };
 
 struct echo_io {
@@ -408,6 +409,7 @@ static int echo_lock_init(const struct lu_env *env,
                 cl_lock_slice_add(lock, &el->el_cl, obj, &echo_lock_ops);
                 el->el_object = cl2echo_obj(obj);
                 CFS_INIT_LIST_HEAD(&el->el_chain);
+                atomic_set(&el->el_refcount, 0);
         }
         RETURN(el == NULL ? -ENOMEM : 0);
 }
@@ -763,6 +765,24 @@ static struct lu_device *echo_device_fini(const struct lu_env *env,
         return NULL;
 }
 
+static void echo_lock_release(const struct lu_env *env,
+                              struct echo_lock *ecl,
+                              int still_used)
+{
+        struct cl_lock *clk = echo_lock2cl(ecl);
+
+        cl_lock_get(clk);
+        cl_unuse(env, clk);
+        cl_lock_release(env, clk, "ec enqueue", ecl->el_object);
+        if (!still_used) {
+                cl_lock_mutex_get(env, clk);
+                cl_lock_cancel(env, clk);
+                cl_lock_delete(env, clk);
+                cl_lock_mutex_put(env, clk);
+        }
+        cl_lock_put(env, clk);
+}
+
 static struct lu_device *echo_device_free(const struct lu_env *env,
                                           struct lu_device *d)
 {
@@ -778,23 +798,18 @@ static struct lu_device *echo_device_free(const struct lu_env *env,
         while (!list_empty(&ec->ec_locks)) {
                 struct echo_lock *ecl = list_entry(ec->ec_locks.next,
                                                    struct echo_lock, el_chain);
-                struct cl_lock *lock  = echo_lock2cl(ecl);
+                int still_used = 0;
 
-                list_del_init(&ecl->el_chain);
+                if (atomic_dec_and_test(&ecl->el_refcount))
+                        list_del_init(&ecl->el_chain);
+                else
+                        still_used = 1;
                 spin_unlock(&ec->ec_lock);
 
-                CERROR("echo client: pending lock %p\n", ecl);
-
-                cl_lock_get(lock);
-                cl_unuse(env, lock);
-                cl_lock_release(env, lock, "ec enqueue", ecl->el_object);
-
-                cl_lock_mutex_get(env, lock);
-                cl_lock_cancel(env, lock);
-                cl_lock_delete(env, lock);
-                cl_lock_mutex_put(env, lock);
-                cl_lock_put(env, lock);
+                CERROR("echo client: pending lock %p refs %d\n",
+                       ecl, atomic_read(&ecl->el_refcount));
 
+                echo_lock_release(env, ecl, still_used);
                 spin_lock(&ec->ec_lock);
         }
         spin_unlock(&ec->ec_lock);
@@ -959,53 +974,75 @@ static int cl_echo_object_put(struct echo_object *eco)
         RETURN(0);
 }
 
-static int cl_echo_enqueue(struct echo_object *eco, obd_off start, obd_off end,
-                           int mode, __u64 *cookie)
+static int cl_echo_enqueue0(struct lu_env *env, struct echo_object *eco,
+                            obd_off start, obd_off end, int mode,
+                            __u64 *cookie , __u32 enqflags)
 {
-        struct lu_env *env;
-        struct cl_lock *lck;
-        struct echo_thread_info *info;
         struct cl_io *io;
+        struct cl_lock *lck;
+        struct cl_object *obj;
         struct cl_lock_descr *descr;
-        struct cl_object *obj = echo_obj2cl(eco);
-        int refcheck;
-        int result;
+        struct echo_thread_info *info;
+        int rc = -ENOMEM;
         ENTRY;
 
-        env = cl_env_get(&refcheck);
-        if (IS_ERR(env))
-                RETURN(PTR_ERR(env));
-
         info = echo_env_info(env);
+        io = &info->eti_io;
         descr = &info->eti_descr;
+        obj = echo_obj2cl(eco);
+
         descr->cld_obj   = obj;
         descr->cld_start = cl_index(obj, start);
         descr->cld_end   = cl_index(obj, end);
         descr->cld_mode  = mode == LCK_PW ? CLM_WRITE : CLM_READ;
-
-        io = &info->eti_io;
+        descr->cld_enq_flags = CEF_ASYNC | enqflags;
         io->ci_obj = obj;
-        result = cl_io_init(env, io, CIT_MISC, obj);
-        if (result < 0)
-                GOTO(out, result);
-        LASSERT(result == 0);
 
-        result = -ENOMEM;
-        lck = cl_lock_request(env, io, descr, CEF_ASYNC, "ec enqueue", eco);
+        lck = cl_lock_request(env, io, descr, "ec enqueue", eco);
         if (lck) {
                 struct echo_client_obd *ec = eco->eo_dev->ed_ec;
                 struct echo_lock *el;
 
-                result = cl_wait(env, lck);
-                if (result == 0) {
+                rc = cl_wait(env, lck);
+                if (rc == 0) {
                         el = cl2echo_lock(cl_lock_at(lck, &echo_device_type));
                         spin_lock(&ec->ec_lock);
-                        list_add(&el->el_chain, &ec->ec_locks);
-                        *cookie = el->el_cookie = ++ec->ec_unique;
+                        if (list_empty(&el->el_chain)) {
+                                list_add(&el->el_chain, &ec->ec_locks);
+                                el->el_cookie = ++ec->ec_unique;
+                        }
+                        atomic_inc(&el->el_refcount);
+                        *cookie = el->el_cookie;
                         spin_unlock(&ec->ec_lock);
                 } else
                         cl_lock_release(env, lck, "ec enqueue", cfs_current());
         }
+        RETURN(rc);
+}
+
+static int cl_echo_enqueue(struct echo_object *eco, obd_off start, obd_off end,
+                           int mode, __u64 *cookie)
+{
+        struct echo_thread_info *info;
+        struct lu_env *env;
+        struct cl_io *io;
+        int refcheck;
+        int result;
+        ENTRY;
+
+        env = cl_env_get(&refcheck);
+        if (IS_ERR(env))
+                RETURN(PTR_ERR(env));
+
+        info = echo_env_info(env);
+        io = &info->eti_io;
+
+        result = cl_io_init(env, io, CIT_MISC, echo_obj2cl(eco));
+        if (result < 0)
+                GOTO(out, result);
+        LASSERT(result == 0);
+
+        result = cl_echo_enqueue0(env, eco, start, end, mode, cookie, 0);
         cl_io_fini(env, io);
 
         EXIT;
@@ -1014,51 +1051,53 @@ out:
         return result;
 }
 
-static int cl_echo_cancel(struct echo_device *ed, __u64 cookie)
+static int cl_echo_cancel0(struct lu_env *env, struct echo_device *ed,
+                           __u64 cookie)
 {
         struct echo_client_obd *ec = ed->ed_ec;
         struct echo_lock       *ecl = NULL;
         struct list_head       *el;
-        int found = 0;
-        int result;
-
-        struct lu_env *env;
-        int refcheck;
+        int found = 0, still_used = 0;
         ENTRY;
 
-        env = cl_env_get(&refcheck);
-        if (IS_ERR(env))
-                RETURN(PTR_ERR(env));
-
+        LASSERT(ec != NULL);
         spin_lock (&ec->ec_lock);
         list_for_each (el, &ec->ec_locks) {
                 ecl = list_entry (el, struct echo_lock, el_chain);
                 CDEBUG(D_INFO, "ecl: %p, cookie: %llx\n", ecl, ecl->el_cookie);
                 found = (ecl->el_cookie == cookie);
                 if (found) {
-                        list_del_init(&ecl->el_chain);
+                        if (atomic_dec_and_test(&ecl->el_refcount))
+                                list_del_init(&ecl->el_chain);
+                        else
+                                still_used = 1;
                         break;
                 }
         }
         spin_unlock (&ec->ec_lock);
 
-        result = -ENOENT;
-        if (found) {
-                struct cl_lock *clk = echo_lock2cl(ecl);
+        if (!found)
+                RETURN(-ENOENT);
 
-                cl_lock_get(clk);
-                cl_unuse(env, clk);
-                cl_lock_release(env, clk, "ec enqueue", ecl->el_object);
+        echo_lock_release(env, ecl, still_used);
+        RETURN(0);
+}
+
+static int cl_echo_cancel(struct echo_device *ed, __u64 cookie)
+{
+        struct lu_env *env;
+        int refcheck;
+        int rc;
+        ENTRY;
+
+        env = cl_env_get(&refcheck);
+        if (IS_ERR(env))
+                RETURN(PTR_ERR(env));
+
+        rc = cl_echo_cancel0(env, ed, cookie);
 
-                cl_lock_mutex_get(env, clk);
-                cl_lock_cancel(env, clk);
-                cl_lock_delete(env, clk);
-                cl_lock_mutex_put(env, clk);
-                cl_lock_put(env, clk);
-                result = 0;
-        }
         cl_env_put(env, &refcheck);
-        RETURN(result);
+        RETURN(rc);
 }
 
 static int cl_echo_async_brw(const struct lu_env *env, struct cl_io *io,
@@ -1089,13 +1128,14 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, obd_off offset,
         struct cl_2queue        *queue;
         struct cl_io            *io;
         struct cl_page          *clp;
-
+        struct lustre_handle    lh = { 0 };
         int page_size = cl_page_size(obj);
         int refcheck;
         int rc;
         int i;
         ENTRY;
 
+        LASSERT((offset & ~CFS_PAGE_MASK) == 0);
         LASSERT(ed->ed_next != NULL);
         env = cl_env_get(&refcheck);
         if (IS_ERR(env))
@@ -1111,6 +1151,14 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, obd_off offset,
                 GOTO(out, rc);
         LASSERT(rc == 0);
 
+
+        rc = cl_echo_enqueue0(env, eco, offset,
+                              offset + npages * CFS_PAGE_SIZE - 1,
+                              rw == READ ? LCK_PW : LCK_PW, &lh.cookie,
+                              CILR_NEVER);
+        if (rc < 0)
+                GOTO(error_lock, rc);
+
         for (i = 0; i < npages; i++) {
                 LASSERT(pages[i]);
                 clp = cl_page_find(env, obj, cl_index(obj, offset),
@@ -1133,6 +1181,8 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, obd_off offset,
                 /* drop the reference count for cl_page_find, so that the page
                  * will be freed in cl_2queue_fini. */
                 cl_page_put(env, clp);
+                cl_page_clip(env, clp, 0, page_size);
+
                 offset += page_size;
         }
 
@@ -1149,12 +1199,13 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, obd_off offset,
                        async ? "async" : "sync", rc);
         }
 
+        cl_echo_cancel0(env, ed, lh.cookie);
+        EXIT;
+error_lock:
         cl_2queue_discard(env, io, queue);
         cl_2queue_disown(env, io, queue);
         cl_2queue_fini(env, queue);
         cl_io_fini(env, io);
-
-        EXIT;
 out:
         cl_env_put(env, &refcheck);
         return rc;
index c126570..d5a4837 100644 (file)
@@ -864,6 +864,8 @@ static int filter_init_server_data(struct obd_device *obd, struct file * filp)
                         continue;
                 }
 
+                check_lcd(obd->obd_name, cl_idx, lcd);
+
                 last_rcvd = le64_to_cpu(lcd->lcd_last_transno);
 
                 /* These exports are cleaned up by filter_disconnect(), so they
@@ -1551,7 +1553,7 @@ static int filter_prepare_destroy(struct obd_device *obd, obd_id objid,
         rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, LDLM_EXTENT,
                                     &policy, LCK_PW, &flags, ldlm_blocking_ast,
                                     ldlm_completion_ast, NULL, NULL, 0, NULL,
-                                    NULL, lockh);
+                                    lockh);
         if (rc != ELDLM_OK)
                 lockh->cookie = 0;
         RETURN(rc);
@@ -1809,7 +1811,7 @@ static int filter_intent_policy(struct ldlm_namespace *ns,
                          *
                          * Of course, this will all disappear when we switch to
                          * taking liblustre locks on the OST. */
-                        ldlm_res_lvbo_update(res, NULL, 0, 1);
+                        ldlm_res_lvbo_update(res, NULL, 1);
                 }
                 RETURN(ELDLM_LOCK_ABORTED);
         }
@@ -1836,7 +1838,7 @@ static int filter_intent_policy(struct ldlm_namespace *ns,
          * sending ast is not handled. This can result in lost client writes.
          */
         if (rc != 0)
-                ldlm_res_lvbo_update(res, NULL, 0, 1);
+                ldlm_res_lvbo_update(res, NULL, 1);
 
         lock_res(res);
         *reply_lvb = *res_lvb;
@@ -3445,7 +3447,7 @@ int filter_setattr(struct obd_export *exp, struct obd_info *oinfo,
 
         if (res != NULL) {
                 LDLM_RESOURCE_ADDREF(res);
-                rc = ldlm_res_lvbo_update(res, NULL, 0, 0);
+                rc = ldlm_res_lvbo_update(res, NULL, 0);
                 LDLM_RESOURCE_DELREF(res);
                 ldlm_resource_putref(res);
         }
@@ -3697,6 +3699,17 @@ static int filter_statfs(struct obd_device *obd, struct obd_statfs *osfs,
                                ((filter->fo_tot_dirty + filter->fo_tot_pending +
                                  osfs->os_bsize - 1) >> blockbits));
 
+        if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOSPC)) {
+                struct lr_server_data *lsd = filter->fo_fsd;
+                int index = le32_to_cpu(lsd->lsd_ost_index);
+
+                if (obd_fail_val == -1 ||
+                    index == obd_fail_val)
+                        osfs->os_bfree = osfs->os_bavail = 2;
+                else if (obd_fail_loc & OBD_FAIL_ONCE)
+                        obd_fail_loc &= ~OBD_FAILED; /* reset flag */
+        }
+
         /* set EROFS to state field if FS is mounted as RDONLY. The goal is to
          * stop creating files on MDS if OST is not good shape to create
          * objects.*/
index d195627..368842e 100644 (file)
@@ -898,7 +898,7 @@ static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa,
 
                 if (resource != NULL) {
                         LDLM_RESOURCE_ADDREF(resource);
-                        ns->ns_lvbo->lvbo_update(resource, NULL, 0, 1);
+                        ns->ns_lvbo->lvbo_update(resource, NULL, 1);
                         LDLM_RESOURCE_DELREF(resource);
                         ldlm_resource_putref(resource);
                 }
index 56547b3..72e0d65 100644 (file)
@@ -644,10 +644,11 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 
         /* we try to get enough quota to write here, and let ldiskfs
          * decide if it is out of quota or not b=14783 */
-        lquota_chkquota(filter_quota_interface_ref, obd, qcids, rec_pending,
-                        quota_pages, oti, LQUOTA_FLAGS_BLK, (void *)inode,
-                        obj->ioo_bufcnt);
-
+        rc = lquota_chkquota(filter_quota_interface_ref, obd, exp, qcids,
+                             rec_pending, quota_pages, oti, LQUOTA_FLAGS_BLK,
+                             (void *)inode, obj->ioo_bufcnt);
+        if (rc == -ENOTCONN)
+                GOTO(cleanup, rc);
 
         push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
         cleanup_phase = 2;
index 1f627b2..c66055e 100644 (file)
@@ -121,8 +121,7 @@ out_dentry:
  *   If 'increase_only' is true, don't allow values to move backwards.
  */
 static int filter_lvbo_update(struct ldlm_resource *res,
-                              struct ptlrpc_request *r,
-                              int buf_idx, int increase_only)
+                              struct ptlrpc_request *r, int increase_only)
 {
         int rc = 0;
         struct ost_lvb *lvb;
@@ -144,8 +143,7 @@ static int filter_lvbo_update(struct ldlm_resource *res,
                 struct ost_lvb *new;
 
                 /* XXX update always from reply buffer */
-                new = lustre_swab_repbuf(r, buf_idx, sizeof(*new),
-                                         lustre_swab_ost_lvb);
+                new = req_capsule_server_get(&r->rq_pill, &RMF_DLM_LVB);
 
                 if (new == NULL) {
                         CERROR("lustre_swab_buf failed\n");
index e7fe446..b713a49 100644 (file)
@@ -218,7 +218,7 @@ static int filter_intent_policy(struct ldlm_namespace *ns,
                          *
                          * Of course, this will all disappear when we switch to
                          * taking liblustre locks on the OST. */
-                        ldlm_res_lvbo_update(res, NULL, 0, 1);
+                        ldlm_res_lvbo_update(res, NULL, 1);
                 }
                 RETURN(ELDLM_LOCK_ABORTED);
         }
@@ -245,7 +245,7 @@ static int filter_intent_policy(struct ldlm_namespace *ns,
          * sending ast is not handled. This can result in lost client writes.
          */
         if (rc != 0)
-                ldlm_res_lvbo_update(res, NULL, 0, 1);
+                ldlm_res_lvbo_update(res, NULL, 1);
 
         lock_res(res);
         *reply_lvb = *res_lvb;
index 702b94b..c22110a 100644 (file)
@@ -379,7 +379,7 @@ int filter_commitrw(int cmd, struct obd_export *exp,
                         rs = ldlm_resource_get(ns, NULL, &info->fti_resid,
                                                LDLM_EXTENT, 0);
                         if (rs != NULL) {
-                                ns->ns_lvbo->lvbo_update(rs, NULL, 0, 1);
+                                ns->ns_lvbo->lvbo_update(rs, NULL, 1);
                                 ldlm_resource_putref(rs);
                         }
                 }
index edce603..e48eea1 100644 (file)
@@ -125,8 +125,9 @@ out:
  *
  *   If 'increase_only' is true, don't allow values to move backwards.
  */
-static int filter_lvbo_update(struct ldlm_resource *res, struct ptlrpc_request *r,
-                              int buf_idx, int increase_only)
+static int filter_lvbo_update(struct ldlm_resource *res,
+                              struct ptlrpc_request *r,
+                              int increase_only)
 {
         struct filter_device *ofd;
         struct filter_object *fo;
@@ -159,8 +160,8 @@ static int filter_lvbo_update(struct ldlm_resource *res, struct ptlrpc_request *
         if (r != NULL) {
                 struct ost_lvb *new;
 
-                new = lustre_swab_repbuf(r, buf_idx, sizeof(*new),
-                                         lustre_swab_ost_lvb);
+                /* XXX update always from reply buffer */
+                new = req_capsule_server_get(&r->rq_pill, &RMF_DLM_LVB);
                 if (new == NULL) {
                         CERROR("lustre_swab_buf failed\n");
                         goto disk_update;
index 329a710..9a93c01 100644 (file)
@@ -695,7 +695,7 @@ int filter_setattr(struct obd_export *exp,
 
         res = ldlm_resource_get(ns, NULL, &info->fti_resid, LDLM_EXTENT, 0);
         if (res != NULL) {
-                ldlm_res_lvbo_update(res, NULL, 0, 0);
+                ldlm_res_lvbo_update(res, NULL, 0);
                 ldlm_resource_putref(res);
         }
 
@@ -770,7 +770,7 @@ static int filter_punch(struct obd_export *exp, struct obd_info *oinfo,
 
         res = ldlm_resource_get(ns, NULL, &info->fti_resid, LDLM_EXTENT, 0);
         if (res != NULL) {
-                ldlm_res_lvbo_update(res, NULL, 0, 0);
+                ldlm_res_lvbo_update(res, NULL, 0);
                 ldlm_resource_putref(res);
         }
 
@@ -805,7 +805,7 @@ static int filter_destroy_by_fid(const struct lu_env *env,
         rc = ldlm_cli_enqueue_local(ofd->ofd_namespace, &info->fti_resid,
                                     LDLM_EXTENT, &policy, LCK_PW, &flags,
                                     ldlm_blocking_ast, ldlm_completion_ast,
-                                    NULL, NULL, 0, NULL, NULL, &lockh);
+                                    NULL, NULL, 0, NULL, &lockh);
 
         /* We only care about the side-effects, just drop the lock. */
         if (rc == ELDLM_OK)
index a96bd84..7f91fb1 100644 (file)
@@ -97,7 +97,6 @@ struct osc_thread_info {
         struct cl_lock_descr    oti_descr;
         struct cl_attr          oti_attr;
         struct lustre_handle    oti_handle;
-        struct cl_lock_closure  oti_closure;
         struct cl_page_list     oti_plist;
 };
 
@@ -282,7 +281,11 @@ struct osc_page {
          * True for a `temporary page' created by read-ahead code, probably
          * outside of any DLM lock.
          */
-                              ops_temp:1;
+                              ops_temp:1,
+        /**
+         * Set if the page must be transferred with OBD_BRW_SRVLOCK.
+         */
+                              ops_srvlock:1;
         /**
          * Linkage into a per-osc_object list of pages in flight. For
          * debugging.
index 2bd2311..99d76f9 100644 (file)
@@ -82,8 +82,7 @@ static int osc_interpret_create(const struct lu_env *env,
         ENTRY;
 
         if (req->rq_repmsg) {
-                body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                          lustre_swab_ost_body);
+                body = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
                 if (body == NULL && rc == 0)
                         rc = -EPROTO;
         }
@@ -145,10 +144,14 @@ static int osc_interpret_create(const struct lu_env *env,
                 spin_unlock(&oscc->oscc_lock);
                 break;
         }
+        case -EINTR:
         case -EWOULDBLOCK: {
                 /* aka EAGAIN we should not delay create if import failed -
                  * this avoid client stick in create and avoid race with
                  * delorphan */
+                /* EINTR say - old create request is killed due mds<>ost
+                 * eviction - OSCC_FLAG_RECOVERING can already set due
+                 * IMP_DISCONN event */
                 oscc->oscc_flags |= OSCC_FLAG_RECOVERING;
                 /* oscc->oscc_grow_count = OST_MIN_PRECREATE; */
                 spin_unlock(&oscc->oscc_lock);
@@ -189,7 +192,6 @@ static int oscc_internal_create(struct osc_creator *oscc)
 {
         struct ptlrpc_request *request;
         struct ost_body *body;
-        __u32 size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         ENTRY;
 
         LASSERT_SPIN_LOCKED(&oscc->oscc_lock);
@@ -221,9 +223,9 @@ static int oscc_internal_create(struct osc_creator *oscc)
         oscc->oscc_flags |= OSCC_FLAG_CREATING;
         spin_unlock(&oscc->oscc_lock);
 
-        request = ptlrpc_prep_req(oscc->oscc_obd->u.cli.cl_import,
-                                  LUSTRE_OST_VERSION, OST_CREATE, 2,
-                                  size, NULL);
+        request = ptlrpc_request_alloc_pack(oscc->oscc_obd->u.cli.cl_import,
+                                            &RQF_OST_CREATE,
+                                            LUSTRE_OST_VERSION, OST_CREATE);
         if (request == NULL) {
                 spin_lock(&oscc->oscc_lock);
                 oscc->oscc_flags &= ~OSCC_FLAG_CREATING;
@@ -233,7 +235,7 @@ static int oscc_internal_create(struct osc_creator *oscc)
 
         request->rq_request_portal = OST_CREATE_PORTAL;
         ptlrpc_at_set_req_timeout(request);
-        body = lustre_msg_buf(request->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
+        body = req_capsule_client_get(&request->rq_pill, &RMF_OST_BODY);
 
         spin_lock(&oscc->oscc_lock);
         body->oa.o_id = oscc->oscc_last_id + oscc->oscc_grow_count;
@@ -248,7 +250,7 @@ static int oscc_internal_create(struct osc_creator *oscc)
         /* we should not resend create request - anyway we will have delorphan
          * and kill these objects */
         request->rq_no_delay = request->rq_no_resend = 1;
-        ptlrpc_req_set_repsize(request, 2, size);
+        ptlrpc_request_set_replen(request);
 
         request->rq_async_args.pointer_arg[0] = oscc;
         request->rq_interpret_reply = osc_interpret_create;
index ef514da..3d3fe9f 100644 (file)
@@ -384,7 +384,10 @@ static int osc_punch_upcall(void *a, int rc)
         return 0;
 }
 
-#ifdef __KERNEL__
+/* Disable osc_trunc_check() because it is naturally race between read and
+ * truncate. See bug 20645 for details.
+ */
+#if 0 && defined(__KERNEL__)
 /**
  * Checks that there are no pages being written in the extent being truncated.
  */
@@ -454,9 +457,6 @@ static int osc_io_trunc_start(const struct lu_env *env,
         loff_t                   size   = io->u.ci_truncate.tr_size;
         int                      result = 0;
 
-
-        memset(oa, 0, sizeof(*oa));
-
         osc_trunc_check(env, io, oio, size);
 
         if (oio->oi_lockless == 0) {
@@ -470,6 +470,7 @@ static int osc_io_trunc_start(const struct lu_env *env,
                 cl_object_attr_unlock(obj);
         }
 
+        memset(oa, 0, sizeof(*oa));
         if (result == 0) {
                 oa->o_id = loi->loi_id;
                 oa->o_gr = loi->loi_gr;
@@ -636,9 +637,23 @@ static void osc_req_attr_set(const struct lu_env *env,
                 opg = osc_cl_page_osc(apage);
                 apage = opg->ops_cl.cpl_page; /* now apage is a sub-page */
                 lock = cl_lock_at_page(env, apage->cp_obj, apage, NULL, 1, 1);
-                LASSERT(lock != NULL);
+                if (lock == NULL) {
+                        struct cl_object_header *head;
+                        struct cl_lock          *scan;
+
+                        head = cl_object_header(apage->cp_obj);
+                        list_for_each_entry(scan, &head->coh_locks, cll_linkage)
+                                CL_LOCK_DEBUG(D_ERROR, env, scan,
+                                              "no cover page!\n");
+                        CL_PAGE_DEBUG(D_ERROR, env, apage,
+                                      "dump uncover page!\n");
+                        libcfs_debug_dumpstack(NULL);
+                        LBUG();
+                }
+
                 olck = osc_lock_at(lock);
                 LASSERT(olck != NULL);
+                LASSERT(ergo(opg->ops_srvlock, olck->ols_lock == NULL));
                 /* check for lockless io. */
                 if (olck->ols_lock != NULL) {
                         oa->o_handle = olck->ols_lock->l_remote_handle;
index 6ca2014..8cb79b1 100644 (file)
@@ -167,15 +167,28 @@ static void osc_lock_detach(const struct lu_env *env, struct osc_lock *olck)
                 unlock_res_and_lock(dlmlock);
 
         /* release a reference taken in osc_lock_upcall0(). */
+        LASSERT(olck->ols_has_ref);
         lu_ref_del(&dlmlock->l_reference, "osc_lock", olck);
         LDLM_LOCK_RELEASE(dlmlock);
+        olck->ols_has_ref = 0;
+}
+
+static int osc_lock_unhold(struct osc_lock *ols)
+{
+        int result = 0;
+
+        if (ols->ols_hold) {
+                ols->ols_hold = 0;
+                result = osc_cancel_base(&ols->ols_handle,
+                                         ols->ols_einfo.ei_mode);
+        }
+        return result;
 }
 
 static int osc_lock_unuse(const struct lu_env *env,
                           const struct cl_lock_slice *slice)
 {
         struct osc_lock *ols = cl2osc_lock(slice);
-        int result;
 
         LASSERT(ols->ols_state == OLS_GRANTED ||
                 ols->ols_state == OLS_UPCALL_RECEIVED);
@@ -193,10 +206,7 @@ static int osc_lock_unuse(const struct lu_env *env,
          * e.g., for liblustre) sees that lock is released.
          */
         ols->ols_state = OLS_RELEASED;
-        ols->ols_hold = 0;
-        result = osc_cancel_base(&ols->ols_handle, ols->ols_einfo.ei_mode);
-        ols->ols_has_ref = 0;
-        return result;
+        return osc_lock_unhold(ols);
 }
 
 static void osc_lock_fini(const struct lu_env *env,
@@ -211,8 +221,7 @@ static void osc_lock_fini(const struct lu_env *env,
          * to the lock), before reply from a server was received. In this case
          * lock is destroyed immediately after upcall.
          */
-        if (ols->ols_hold)
-                osc_lock_unuse(env, slice);
+        osc_lock_unhold(ols);
         LASSERT(ols->ols_lock == NULL);
 
         OBD_SLAB_FREE_PTR(ols, osc_lock_kmem);
@@ -462,11 +471,12 @@ static void osc_lock_upcall0(const struct lu_env *env, struct osc_lock *olck)
          * this.
          */
         ldlm_lock_addref(&olck->ols_handle, olck->ols_einfo.ei_mode);
-        olck->ols_hold = olck->ols_has_ref = 1;
+        olck->ols_hold = 1;
 
         /* lock reference taken by ldlm_handle2lock_long() is owned by
          * osc_lock and released in osc_lock_detach() */
         lu_ref_add(&dlmlock->l_reference, "osc_lock", olck);
+        olck->ols_has_ref = 1;
 }
 
 /**
@@ -569,12 +579,11 @@ static void osc_lock_blocking(const struct lu_env *env,
         CLASSERT(OLS_BLOCKED < OLS_CANCELLED);
         LASSERT(!osc_lock_is_lockless(olck));
 
-        if (olck->ols_hold)
-                /*
-                 * Lock might be still addref-ed here, if e.g., blocking ast
-                 * is sent for a failed lock.
-                 */
-                osc_lock_unuse(env, &olck->ols_cl);
+        /*
+         * Lock might be still addref-ed here, if e.g., blocking ast
+         * is sent for a failed lock.
+         */
+        osc_lock_unhold(olck);
 
         if (blocking && olck->ols_state < OLS_BLOCKED)
                 /*
@@ -771,7 +780,7 @@ static int osc_ldlm_completion_ast(struct ldlm_lock *dlmlock,
                         LASSERT(dlmlock->l_lvb_data != NULL);
                         lock_res_and_lock(dlmlock);
                         olck->ols_lvb = *(struct ost_lvb *)dlmlock->l_lvb_data;
-                        if (olck->ols_lock == NULL)
+                        if (olck->ols_lock == NULL) {
                                 /*
                                  * upcall (osc_lock_upcall()) hasn't yet been
                                  * called. Do nothing now, upcall will bind
@@ -781,12 +790,17 @@ static int osc_ldlm_completion_ast(struct ldlm_lock *dlmlock,
                                  * and ldlm_lock are always bound when
                                  * osc_lock is in OLS_GRANTED state.
                                  */
-                                ;
-                        else if (dlmlock->l_granted_mode != LCK_MINMODE)
+                        } else if (dlmlock->l_granted_mode ==
+                                   dlmlock->l_req_mode) {
                                 osc_lock_granted(env, olck, dlmlock, dlmrc);
+                        }
                         unlock_res_and_lock(dlmlock);
-                        if (dlmrc != 0)
+
+                        if (dlmrc != 0) {
+                                CL_LOCK_DEBUG(D_ERROR, env, lock,
+                                              "dlmlock returned %d\n", dlmrc);
                                 cl_lock_error(env, lock, dlmrc);
+                        }
                         cl_lock_mutex_put(env, lock);
                         osc_ast_data_put(env, olck);
                         result = 0;
@@ -936,86 +950,6 @@ static void osc_lock_build_einfo(const struct lu_env *env,
         einfo->ei_cbdata = lock; /* value to be put into ->l_ast_data */
 }
 
-static int osc_lock_delete0(struct cl_lock *conflict)
-{
-        struct cl_env_nest    nest;
-        struct lu_env        *env;
-        int    rc = 0;        
-
-        env = cl_env_nested_get(&nest);
-        if (!IS_ERR(env)) {
-                cl_lock_delete(env, conflict);
-                cl_env_nested_put(&nest, env);
-        } else
-                rc = PTR_ERR(env);
-        return rc; 
-}
-/**
- * Cancels \a conflict lock and waits until it reached CLS_FREEING state. This
- * is called as a part of enqueuing to cancel conflicting locks early.
- *
- * \retval            0: success, \a conflict was cancelled and destroyed.
- *
- * \retval   CLO_REPEAT: \a conflict was cancelled, but \a lock mutex was
- *                       released in the process. Repeat enqueing.
- *
- * \retval -EWOULDBLOCK: \a conflict cannot be cancelled immediately, and
- *                       either \a lock is non-blocking, or current thread
- *                       holds other locks, that prevent it from waiting
- *                       for cancel to complete.
- *
- * \retval          -ve: other error, including -EINTR.
- *
- */
-static int osc_lock_cancel_wait(const struct lu_env *env, struct cl_lock *lock,
-                                struct cl_lock *conflict, int canwait)
-{
-        int rc;
-
-        LASSERT(cl_lock_is_mutexed(lock));
-        LASSERT(cl_lock_is_mutexed(conflict));
-
-        rc = 0;
-        if (conflict->cll_state != CLS_FREEING) {
-                cl_lock_cancel(env, conflict);
-                rc = osc_lock_delete0(conflict);
-                if (rc)
-                        return rc; 
-                if (conflict->cll_flags & (CLF_CANCELPEND|CLF_DOOMED)) {
-                        rc = -EWOULDBLOCK;
-                        if (cl_lock_nr_mutexed(env) > 2)
-                                /*
-                                 * If mutices of locks other than @lock and
-                                 * @scan are held by the current thread, it
-                                 * cannot wait on @scan state change in a
-                                 * dead-lock safe matter, so simply skip early
-                                 * cancellation in this case.
-                                 *
-                                 * This means that early cancellation doesn't
-                                 * work when there is even slight mutex
-                                 * contention, as top-lock's mutex is usually
-                                 * held at this time.
-                                 */
-                                ;
-                        else if (canwait) {
-                                /* Waiting for @scan to be destroyed */
-                                cl_lock_mutex_put(env, lock);
-                                do {
-                                        rc = cl_lock_state_wait(env, conflict);
-                                } while (!rc &&
-                                         conflict->cll_state < CLS_FREEING);
-                                /* mutex was released, repeat enqueue. */
-                                rc = rc ?: CLO_REPEAT;
-                                cl_lock_mutex_get(env, lock);
-                        }
-                }
-                LASSERT(ergo(!rc, conflict->cll_state == CLS_FREEING));
-                CDEBUG(D_INFO, "lock %p was %s freed now, rc (%d)\n",
-                       conflict, rc ? "not":"", rc);
-        }
-        return rc;
-}
-
 /**
  * Determine if the lock should be converted into a lockless lock.
  *
@@ -1071,6 +1005,28 @@ static void osc_lock_to_lockless(const struct lu_env *env,
         LASSERT(ergo(ols->ols_glimpse, !osc_lock_is_lockless(ols)));
 }
 
+static int osc_lock_compatible(const struct osc_lock *qing,
+                               const struct osc_lock *qed)
+{
+        enum cl_lock_mode qing_mode;
+        enum cl_lock_mode qed_mode;
+
+        qing_mode = qing->ols_cl.cls_lock->cll_descr.cld_mode;
+        if (qed->ols_glimpse &&
+            (qed->ols_state >= OLS_UPCALL_RECEIVED || qing_mode == CLM_READ))
+                return 1;
+
+        qed_mode = qed->ols_cl.cls_lock->cll_descr.cld_mode;
+        return ((qing_mode == CLM_READ) && (qed_mode == CLM_READ));
+}
+
+#ifndef list_for_each_entry_continue 
+#define list_for_each_entry_continue(pos, head, member)                 \
+        for (pos = list_entry(pos->member.next, typeof(*pos), member);  \
+             prefetch(pos->member.next), &pos->member != (head);        \
+             pos = list_entry(pos->member.next, typeof(*pos), member))
+#endif
+
 /**
  * Cancel all conflicting locks and wait for them to be destroyed.
  *
@@ -1088,36 +1044,29 @@ static int osc_lock_enqueue_wait(const struct lu_env *env,
         struct cl_lock          *lock    = olck->ols_cl.cls_lock;
         struct cl_lock_descr    *descr   = &lock->cll_descr;
         struct cl_object_header *hdr     = cl_object_header(descr->cld_obj);
-        struct cl_lock_closure  *closure = &osc_env_info(env)->oti_closure;
-        struct cl_lock          *scan;
-        struct cl_lock          *temp;
+        struct cl_lock          *scan    = lock;
+        struct cl_lock          *conflict= NULL;
         int lockless                     = osc_lock_is_lockless(olck);
         int rc                           = 0;
-        int canwait;
-        int stop;
         ENTRY;
 
         LASSERT(cl_lock_is_mutexed(lock));
         LASSERT(lock->cll_state == CLS_QUEUING);
 
-        /*
-         * XXX This function could be sped up if we had asynchronous
-         * cancellation.
-         */
+        /* make it enqueue anyway for glimpse lock, because we actually
+         * don't need to cancel any conflicting locks. */
+        if (olck->ols_glimpse)
+                return 0;
 
-        canwait =
-                !(olck->ols_flags & LDLM_FL_BLOCK_NOWAIT) &&
-                cl_lock_nr_mutexed(env) == 1;
-        cl_lock_closure_init(env, closure, lock, canwait);
         spin_lock(&hdr->coh_lock_guard);
-        list_for_each_entry_safe(scan, temp, &hdr->coh_locks, cll_linkage) {
-                if (scan == lock)
-                        continue;
+        list_for_each_entry_continue(scan, &hdr->coh_locks, cll_linkage) {
+                struct cl_lock_descr *cld = &scan->cll_descr;
+                const struct osc_lock *scan_ols;
 
                 if (scan->cll_state < CLS_QUEUING ||
                     scan->cll_state == CLS_FREEING ||
-                    scan->cll_descr.cld_start > descr->cld_end ||
-                    scan->cll_descr.cld_end < descr->cld_start)
+                    cld->cld_start > descr->cld_end ||
+                    cld->cld_end < descr->cld_start)
                         continue;
 
                 /* overlapped and living locks. */
@@ -1129,52 +1078,39 @@ static int osc_lock_enqueue_wait(const struct lu_env *env,
                         continue;
                 }
 
-                /* A tricky case for lockless pages:
-                 * We need to cancel the compatible locks if we're enqueuing
+                scan_ols = osc_lock_at(scan);
+
+                /* We need to cancel the compatible locks if we're enqueuing
                  * a lockless lock, for example:
                  * imagine that client has PR lock on [0, 1000], and thread T0
                  * is doing lockless IO in [500, 1500] region. Concurrent
                  * thread T1 can see lockless data in [500, 1000], which is
-                 * wrong, because these data are possibly stale.
-                 */
-                if (!lockless && cl_lock_compatible(scan, lock))
+                 * wrong, because these data are possibly stale. */
+                if (!lockless && osc_lock_compatible(olck, scan_ols))
                         continue;
 
                 /* Now @scan is conflicting with @lock, this means current
                  * thread have to sleep for @scan being destroyed. */
-                cl_lock_get_trust(scan);
-                if (&temp->cll_linkage != &hdr->coh_locks)
-                        cl_lock_get_trust(temp);
-                spin_unlock(&hdr->coh_lock_guard);
-                lu_ref_add(&scan->cll_reference, "cancel-wait", lock);
-
-                LASSERT(list_empty(&closure->clc_list));
-                rc = cl_lock_closure_build(env, scan, closure);
-                if (rc == 0) {
-                        rc = osc_lock_cancel_wait(env, lock, scan, canwait);
-                        cl_lock_disclosure(env, closure);
-                        if (rc == -EWOULDBLOCK)
-                                rc = 0;
+                if (scan_ols->ols_owner == osc_env_io(env)) {
+                        CERROR("DEADLOCK POSSIBLE!\n");
+                        CL_LOCK_DEBUG(D_ERROR, env, scan, "queued.\n");
+                        CL_LOCK_DEBUG(D_ERROR, env, lock, "queuing.\n");
+                        libcfs_debug_dumpstack(NULL);
                 }
-                if (rc == CLO_REPEAT && !canwait)
-                        /* cannot wait... no early cancellation. */
-                        rc = 0;
-
-                lu_ref_del(&scan->cll_reference, "cancel-wait", lock);
-                cl_lock_put(env, scan);
-                spin_lock(&hdr->coh_lock_guard);
-                /*
-                 * Lock list could have been modified, while spin-lock was
-                 * released. Check that it is safe to continue.
-                 */
-                stop = list_empty(&temp->cll_linkage);
-                if (&temp->cll_linkage != &hdr->coh_locks)
-                        cl_lock_put(env, temp);
-                if (stop || rc != 0)
-                        break;
+                cl_lock_get_trust(scan);
+                conflict = scan;
+                break;
         }
         spin_unlock(&hdr->coh_lock_guard);
-        cl_lock_closure_fini(closure);
+
+        if (conflict) {
+                CDEBUG(D_DLMTRACE, "lock %p is confliced with %p, will wait\n",
+                       lock, conflict);
+                lu_ref_add(&conflict->cll_reference, "cancel-wait", lock);
+                LASSERT(lock->cll_conflict == NULL);
+                lock->cll_conflict = conflict;
+                rc = CLO_WAIT;
+        }
         RETURN(rc);
 }
 
@@ -1276,12 +1212,12 @@ static int osc_lock_enqueue(const struct lu_env *env,
                 ols->ols_flags |= LDLM_FL_BLOCK_GRANTED;
         if (ols->ols_flags & LDLM_FL_HAS_INTENT)
                 ols->ols_glimpse = 1;
+        if (!(enqflags & CEF_MUST))
+                /* try to convert this lock to a lockless lock */
+                osc_lock_to_lockless(env, ols, (enqflags & CEF_NEVER));
 
         result = osc_lock_enqueue_wait(env, ols);
         if (result == 0) {
-                if (!(enqflags & CEF_MUST))
-                        /* try to convert this lock to a lockless lock */
-                        osc_lock_to_lockless(env, ols, (enqflags & CEF_NEVER));
                 if (!osc_lock_is_lockless(ols)) {
                         if (ols->ols_locklessable)
                                 ols->ols_flags |= LDLM_FL_DENY_ON_CONTENTION;
@@ -1343,13 +1279,14 @@ static int osc_lock_use(const struct lu_env *env,
         int rc;
 
         LASSERT(!olck->ols_hold);
+
         /*
          * Atomically check for LDLM_FL_CBPENDING and addref a lock if this
          * flag is not set. This protects us from a concurrent blocking ast.
          */
         rc = ldlm_lock_addref_try(&olck->ols_handle, olck->ols_einfo.ei_mode);
         if (rc == 0) {
-                olck->ols_hold = olck->ols_has_ref = 1;
+                olck->ols_hold = 1;
                 olck->ols_state = OLS_GRANTED;
         } else {
                 struct cl_lock *lock;
@@ -1422,8 +1359,7 @@ static void osc_lock_cancel(const struct lu_env *env,
 
                 discard = dlmlock->l_flags & LDLM_FL_DISCARD_DATA;
                 result = osc_lock_flush(olck, discard);
-                if (olck->ols_hold)
-                        osc_lock_unuse(env, slice);
+                osc_lock_unhold(olck);
 
                 lock_res_and_lock(dlmlock);
                 /* Now that we're the only user of dlm read/write reference,
@@ -1521,8 +1457,7 @@ static void osc_lock_delete(const struct lu_env *env,
         LINVRNT(osc_lock_invariant(olck));
         LINVRNT(!osc_lock_has_pages(olck));
 
-        if (olck->ols_hold)
-                osc_lock_unuse(env, slice);
+        osc_lock_unhold(olck);
         osc_lock_detach(env, olck);
 }
 
@@ -1562,7 +1497,7 @@ static int osc_lock_print(const struct lu_env *env, void *cookie,
         /*
          * XXX print ldlm lock and einfo properly.
          */
-        (*p)(env, cookie, "%p %08x "LPU64" %d %p ",
+        (*p)(env, cookie, "%p %08x "LPX64" %d %p ",
              lock->ols_lock, lock->ols_flags, lock->ols_handle.cookie,
              lock->ols_state, lock->ols_owner);
         osc_lvb_print(env, cookie, p, &lock->ols_lvb);
@@ -1576,24 +1511,40 @@ static int osc_lock_fits_into(const struct lu_env *env,
 {
         struct osc_lock *ols = cl2osc_lock(slice);
 
-        /* If the lock hasn't ever enqueued, it can't be matched because
-         * enqueue process brings in many information which can be used to
-         * determine things such as lockless, CEF_MUST, etc.
-         */
-        if (ols->ols_state < OLS_ENQUEUED)
+        if (need->cld_enq_flags & CEF_NEVER)
                 return 0;
 
-        /* Don't match this lock if the lock is able to become lockless lock.
-         * This is because the new lock might be covering a mmap region and
-         * so that it must have a cached at the local side. */
-        if (ols->ols_state < OLS_UPCALL_RECEIVED && ols->ols_locklessable)
-                return 0;
-
-        /* If the lock is going to be canceled, no reason to match it as well */
-        if (ols->ols_state > OLS_RELEASED)
-                return 0;
-
-        /* go for it. */
+        if (need->cld_mode == CLM_PHANTOM) {
+                /*
+                 * Note: the QUEUED lock can't be matched here, otherwise
+                 * it might cause the deadlocks.
+                 * In read_process,
+                 * P1: enqueued read lock, create sublock1
+                 * P2: enqueued write lock, create sublock2(conflicted
+                 *     with sublock1).
+                 * P1: Grant read lock.
+                 * P1: enqueued glimpse lock(with holding sublock1_read),
+                 *     matched with sublock2, waiting sublock2 to be granted.
+                 *     But sublock2 can not be granted, because P1
+                 *     will not release sublock1. Bang!
+                 */
+                if (ols->ols_state < OLS_GRANTED ||
+                        ols->ols_state > OLS_RELEASED)
+                        return 0;
+        } else if (need->cld_enq_flags & CEF_MUST) {
+                 /*
+                 * If the lock hasn't ever enqueued, it can't be matched
+                 * because enqueue process brings in many information
+                 * which can be used to determine things such as lockless,
+                 * CEF_MUST, etc.
+                 */
+                if (ols->ols_state < OLS_GRANTED ||
+                        ols->ols_state > OLS_RELEASED)
+                        return 0;
+                if (ols->ols_state < OLS_UPCALL_RECEIVED &&
+                        ols->ols_locklessable)
+                        return 0;
+        }
         return 1;
 }
 
index 2d5b63f..38581f5 100644 (file)
@@ -212,7 +212,6 @@ static int osc_page_cache_add(const struct lu_env *env,
 {
         struct osc_page   *opg = cl2osc_page(slice);
         struct osc_object *obj = cl2osc(opg->ops_cl.cpl_obj);
-        struct osc_io     *oio = osc_env_io(env);
         int result;
         int brw_flags;
         int noquota = 0;
@@ -221,7 +220,7 @@ static int osc_page_cache_add(const struct lu_env *env,
         ENTRY;
 
         /* Set the OBD_BRW_SRVLOCK before the page is queued. */
-        brw_flags = osc_io_srvlock(oio) ? OBD_BRW_SRVLOCK : 0;
+        brw_flags = opg->ops_srvlock ? OBD_BRW_SRVLOCK : 0;
         if (!client_is_remote(osc_export(obj)) &&
             cfs_capable(CFS_CAP_SYS_RESOURCE)) {
                 brw_flags |= OBD_BRW_NOQUOTA;
@@ -303,7 +302,7 @@ static int osc_page_print(const struct lu_env *env,
         return (*printer)(env, cookie, LUSTRE_OSC_NAME"-page@%p: "
                           "1< %#x %d %u %s %s %s > "
                           "2< %llu %u %#x %#x | %p %p %p %p %p > "
-                          "3< %s %p %d %lu > "
+                          "3< %s %p %d %lu %d > "
                           "4< %d %d %d %lu %s | %s %s %s %s > "
                           "5< %s %s %s %s | %d %s %s | %d %s %s>\n",
                           opg,
@@ -322,7 +321,7 @@ static int osc_page_print(const struct lu_env *env,
                           /* 3 */
                           osc_list(&opg->ops_inflight),
                           opg->ops_submitter, opg->ops_transfer_pinned,
-                          osc_submit_duration(opg),
+                          osc_submit_duration(opg), opg->ops_srvlock,
                           /* 4 */
                           cli->cl_r_in_flight, cli->cl_w_in_flight,
                           cli->cl_max_rpcs_in_flight,
@@ -571,9 +570,12 @@ struct cl_page *osc_page_init(const struct lu_env *env,
                                              cl_offset(obj, page->cp_index),
                                              &osc_async_page_ops,
                                              opg, (void **)&oap, 1, NULL);
-                if (result == 0)
+                if (result == 0) {
+                        struct osc_io *oio = osc_env_io(env);
+                        opg->ops_srvlock = osc_io_srvlock(oio);
                         cl_page_slice_add(page, &opg->ops_cl, obj,
                                           &osc_page_ops);
+                }
                 /*
                  * Cannot assert osc_page_protected() here as read-ahead
                  * creates temporary pages outside of a lock.
index f81b368..338448e 100644 (file)
@@ -210,8 +210,7 @@ static int osc_getattr_interpret(const struct lu_env *env,
         if (rc != 0)
                 GOTO(out, rc);
 
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         if (body) {
                 CDEBUG(D_INODE, "mode: %o\n", body->oa.o_mode);
                 lustre_get_wire_obdo(aa->aa_oi->oi_oa, &body->oa);
@@ -1138,19 +1137,18 @@ static int check_write_rcs(struct ptlrpc_request *req,
                            int requested_nob, int niocount,
                            obd_count page_count, struct brw_page **pga)
 {
-        int    *remote_rcs, i;
+        int     i;
+        __u32   *remote_rcs;
 
-        /* return error if any niobuf was in error */
-        remote_rcs = lustre_swab_repbuf(req, REQ_REC_OFF + 1,
-                                        sizeof(*remote_rcs) * niocount, NULL);
+        remote_rcs = req_capsule_server_sized_get(&req->rq_pill, &RMF_RCS,
+                                                  sizeof(*remote_rcs) *
+                                                  niocount);
         if (remote_rcs == NULL) {
                 CDEBUG(D_INFO, "Missing/short RC vector on BRW_WRITE reply\n");
                 return(-EPROTO);
         }
-        if (ptlrpc_rep_need_swab(req))
-                for (i = 0; i < niocount; i++)
-                        __swab32s(&remote_rcs[i]);
 
+        /* return error if any niobuf was in error */
         for (i = 0; i < niocount; i++) {
                 if (remote_rcs[i] < 0)
                         return(remote_rcs[i]);
@@ -1264,6 +1262,8 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
         }
 
         pill = &req->rq_pill;
+        req_capsule_set_size(pill, &RMF_OBD_IOOBJ, RCL_CLIENT,
+                             sizeof(*ioobj));
         req_capsule_set_size(pill, &RMF_NIOBUF_REMOTE, RCL_CLIENT,
                              niocount * sizeof(*niobuf));
         osc_set_capa_size(req, &RMF_CAPA1, ocapa);
@@ -1290,7 +1290,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
         body = req_capsule_client_get(pill, &RMF_OST_BODY);
         ioobj = req_capsule_client_get(pill, &RMF_OBD_IOOBJ);
         niobuf = req_capsule_client_get(pill, &RMF_NIOBUF_REMOTE);
-        LASSERT(body && ioobj && niobuf);
+        LASSERT(body != NULL && ioobj != NULL && niobuf != NULL);
 
         lustre_set_wire_obdo(&body->oa, oa);
 
@@ -1337,11 +1337,9 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
         }
 
         LASSERTF((void *)(niobuf - niocount) ==
-                lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                               niocount * sizeof(*niobuf)),
-                "want %p - real %p\n", lustre_msg_buf(req->rq_reqmsg,
-                REQ_REC_OFF + 2, niocount * sizeof(*niobuf)),
-                (void *)(niobuf - niocount));
+                req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE),
+                "want %p - real %p\n", req_capsule_client_get(&req->rq_pill,
+                &RMF_NIOBUF_REMOTE), (void *)(niobuf - niocount));
 
         osc_announce_cached(cli, &body->oa, opc == OST_WRITE ? requested_nob:0);
         if (osc_should_shrink_grant(cli))
@@ -1377,7 +1375,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
                 }
                 oa->o_cksum = body->oa.o_cksum;
                 /* 1 RC per niobuf */
-                req_capsule_set_size(pill, &RMF_NIOBUF_REMOTE, RCL_SERVER,
+                req_capsule_set_size(pill, &RMF_RCS, RCL_SERVER,
                                      sizeof(__u32) * niocount);
         } else {
                 if (unlikely(cli->cl_checksum) &&
@@ -1387,7 +1385,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
                         body->oa.o_flags |= cksum_type_pack(cli->cl_cksum_type);
                         body->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
                 }
-                req_capsule_set_size(pill, &RMF_NIOBUF_REMOTE, RCL_SERVER, 0);
+                req_capsule_set_size(pill, &RMF_RCS, RCL_SERVER, 0);
                 /* 1 RC for the whole I/O */
         }
         ptlrpc_request_set_replen(req);
@@ -1479,8 +1477,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
                 RETURN(rc);
 
         LASSERTF(req->rq_repmsg != NULL, "rc = %d\n", rc);
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL) {
                 CDEBUG(D_INFO, "Can't unpack body\n");
                 RETURN(-EPROTO);
@@ -3157,8 +3154,7 @@ static int osc_enqueue_interpret(const struct lu_env *env,
         /* Complete obtaining the lock procedure. */
         rc = ldlm_cli_enqueue_fini(aa->oa_exp, req, aa->oa_ei->ei_type, 1,
                                    mode, aa->oa_flags, aa->oa_lvb,
-                                   sizeof(*aa->oa_lvb), lustre_swab_ost_lvb,
-                                   &handle, rc);
+                                   sizeof(*aa->oa_lvb), &handle, rc);
         /* Complete osc stuff. */
         rc = osc_enqueue_fini(req, aa->oa_lvb,
                               aa->oa_upcall, aa->oa_cookie, aa->oa_flags, rc);
@@ -3325,7 +3321,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
         *flags &= ~LDLM_FL_BLOCK_GRANTED;
 
         rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, policy, flags, lvb,
-                              sizeof(*lvb), lustre_swab_ost_lvb, lockh, async);
+                              sizeof(*lvb), lockh, async);
         if (rqset) {
                 if (!rc) {
                         struct osc_enqueue_args *aa;
index af280ca..93f3331 100644 (file)
@@ -1931,8 +1931,8 @@ static int osd_ea_fid_set(const struct lu_env *env, struct dt_object *dt,
         struct osd_thread_info  *info      = osd_oti_get(env);
         struct lustre_mdt_attrs *mdt_attrs = &info->oti_mdt_attrs;
 
-        fid_cpu_to_be(&mdt_attrs->lma_self_fid, fid);
-
+        lustre_lma_init(mdt_attrs, fid);
+        lustre_lma_swab(mdt_attrs);
         return __osd_xattr_set(env, dt,
                                osd_buf_get(env, mdt_attrs, sizeof *mdt_attrs),
                                XATTR_NAME_LMA, LU_XATTR_CREATE);
@@ -2015,15 +2015,16 @@ static int osd_ea_fid_get(const struct lu_env *env, struct osd_object *obj,
 
         /* Check LMA compatibility */
         if (rc > 0 &&
-            (mdt_attrs->lma_incompat & ~cpu_to_be32(LMA_INCOMPAT_SUPP))) {
+            (mdt_attrs->lma_incompat & ~cpu_to_le32(LMA_INCOMPAT_SUPP))) {
                 CWARN("Inode %lx: Unsupported incompat LMA feature(s) %#x\n",
-                      inode->i_ino, be32_to_cpu(mdt_attrs->lma_incompat) &
+                      inode->i_ino, le32_to_cpu(mdt_attrs->lma_incompat) &
                       ~LMA_INCOMPAT_SUPP);
                 return -ENOSYS;
         }
 
         if (rc > 0) {
-                fid_be_to_cpu(fid, &mdt_attrs->lma_self_fid);
+                lustre_lma_swab(mdt_attrs);
+                memcpy(fid, &mdt_attrs->lma_self_fid, sizeof(*fid));
                 rc = 0;
         } else if (rc == -ENODATA) {
                 osd_igif_get(env, inode, fid);
@@ -2770,7 +2771,7 @@ static int osd_index_ea_delete(const struct lu_env *env, struct dt_object *dt,
                                       (char *)key, strlen((char *)key));
 
         down_write(&obj->oo_ext_idx_sem);
-        bh = ldiskfs_find_entry(dentry, &de);
+        bh = ll_ldiskfs_find_entry(dir, dentry, &de);
         if (bh) {
                 struct osd_thread_info *oti = osd_oti_get(env);
                 struct timespec *ctime = &oti->oti_time;
@@ -3009,7 +3010,7 @@ static int osd_add_dot_dotdot(struct osd_thread_info *info,
                 if (dir->oo_compat_dotdot_created)
                         return __osd_ea_add_rec(info, dir, obj, name, th);
 
-                result = ldiskfs_add_dot_dotdot(oth->ot_handle, parent_dir, inode, NULL, NULL);
+                result = ldiskfs_add_dot_dotdot(oth->ot_handle, parent_dir, inode);
                 if (result == 0)
                        dir->oo_compat_dotdot_created = 1;
         }
@@ -3065,7 +3066,7 @@ static int osd_ea_lookup_rec(const struct lu_env *env, struct osd_object *obj,
                                       (char *)key, strlen((char *)key));
 
         down_read(&obj->oo_ext_idx_sem);
-        bh = ldiskfs_find_entry(dentry, &de);
+        bh = ll_ldiskfs_find_entry(dir, dentry, &de);
         if (bh) {
                 ino = le32_to_cpu(de->inode);
                 brelse(bh);
index 2279a30..f99c805 100644 (file)
@@ -106,40 +106,51 @@ static int ost_destroy(struct obd_export *exp, struct ptlrpc_request *req,
                        struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         struct lustre_capa *capa = NULL;
         int rc;
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        /* Get the request body */
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL)
                 RETURN(-EFAULT);
 
         if (body->oa.o_id == 0)
                 RETURN(-EPROTO);
 
-        if (lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1)) {
+        /* If there's a DLM request, cancel the locks mentioned in it*/
+        if (req_capsule_field_present(&req->rq_pill, &RMF_DLM_REQ, RCL_CLIENT)) {
                 struct ldlm_request *dlm;
-                dlm = lustre_swab_reqbuf(req, REQ_REC_OFF + 1, sizeof(*dlm),
-                                         lustre_swab_ldlm_request);
+
+                dlm = req_capsule_client_get(&req->rq_pill, &RMF_DLM_REQ);
                 if (dlm == NULL)
                         RETURN (-EFAULT);
                 ldlm_request_cancel(req, dlm, 0);
         }
 
-        if (body->oa.o_valid & OBD_MD_FLOSSCAPA)
-                capa = lustre_unpack_incoming_capa(req, REQ_REC_OFF + 2);
+        /* If there's a capability, get it */
+        if (body->oa.o_valid & OBD_MD_FLOSSCAPA) {
+                capa = req_capsule_client_get(&req->rq_pill, &RMF_CAPA1);
+                if (capa == NULL) {
+                        CERROR("Missing capability for OST DESTROY");
+                        RETURN (-EFAULT);
+                }
+        }
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        /* Prepare the reply */
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
+        /* Get the log cancellation cookie */
         if (body->oa.o_valid & OBD_MD_FLCOOKIE)
                 oti->oti_logcookies = &body->oa.o_lcookie;
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+
+        /* Finish the reply */
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
+
+        /* Do the destroy and set the reply status accordingly  */
         req->rq_status = obd_destroy(exp, &body->oa, NULL, oti, NULL, capa);
         RETURN(0);
 }
@@ -148,27 +159,30 @@ static int ost_getattr(struct obd_export *exp, struct ptlrpc_request *req)
 {
         struct ost_body *body, *repbody;
         struct obd_info oinfo = { { { 0 } } };
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         int rc;
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL)
                 RETURN(-EFAULT);
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         repbody->oa = body->oa;
 
         oinfo.oi_oa = &repbody->oa;
-        if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA)
-                oinfo.oi_capa = lustre_unpack_incoming_capa(req,
-                                                   REQ_REC_OFF + 1);
+        if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA) {
+                oinfo.oi_capa = req_capsule_client_get(&req->rq_pill,
+                                                       &RMF_CAPA1);
+                if (oinfo.oi_capa == NULL) {
+                        CERROR("Missing capability for OST GETATTR");
+                        RETURN (-EFAULT);
+                }
+        }
+
         req->rq_status = obd_getattr(exp, &oinfo);
         ost_drop_id(exp, &repbody->oa);
         RETURN(0);
@@ -177,20 +191,17 @@ static int ost_getattr(struct obd_export *exp, struct ptlrpc_request *req)
 static int ost_statfs(struct ptlrpc_request *req)
 {
         struct obd_statfs *osfs;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*osfs) };
         int rc;
         ENTRY;
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        osfs = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*osfs));
+        osfs = req_capsule_server_get(&req->rq_pill, &RMF_OBD_STATFS);
 
         req->rq_status = obd_statfs(req->rq_export->exp_obd, osfs,
                                     cfs_time_current_64() - HZ, 0);
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOSPC))
-                osfs->os_bfree = osfs->os_bavail = 64;
         if (req->rq_status != 0)
                 CERROR("ost: statfs failed: rc %d\n", req->rq_status);
 
@@ -201,21 +212,18 @@ static int ost_create(struct obd_export *exp, struct ptlrpc_request *req,
                       struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
         int rc;
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL)
                 RETURN(-EFAULT);
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
         oti->oti_logcookies = &repbody->oa.o_lcookie;
 
@@ -224,7 +232,7 @@ static int ost_create(struct obd_export *exp, struct ptlrpc_request *req,
         RETURN(0);
 }
 
-/*
+/**
  * Helper function for ost_punch(): if asked by client, acquire [size, EOF]
  * lock on the file being truncated.
  */
@@ -271,11 +279,10 @@ static int ost_punch_lock_get(struct obd_export *exp, struct obdo *oa,
         RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
                                       LDLM_EXTENT, &policy, LCK_PW, &flags,
                                       ldlm_blocking_ast, ldlm_completion_ast,
-                                      ldlm_glimpse_ast, NULL, 0, NULL,
-                                      NULL, lh));
+                                      ldlm_glimpse_ast, NULL, 0, NULL, lh));
 }
 
-/*
+/**
  * Helper function for ost_punch(): release lock acquired by
  * ost_punch_lock_get(), if any.
  */
@@ -293,7 +300,6 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
 {
         struct obd_info oinfo = { { { 0 } } };
         struct ost_body *body, *repbody;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
         int rc;
         struct lustre_handle lh = {0,};
         ENTRY;
@@ -301,9 +307,9 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
         /* check that we do support OBD_CONNECT_TRUNCLOCK. */
         CLASSERT(OST_CONNECT_SUPPORTED & OBD_CONNECT_TRUNCLOCK);
 
-        /* ost_body is varified and swabbed in ost_hpreq_handler() */
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                RETURN(-EFAULT);
 
         oinfo.oi_oa = &body->oa;
         oinfo.oi_policy.l_extent.start = oinfo.oi_oa->o_size;
@@ -313,12 +319,11 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
             (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS))
                 RETURN(-EPROTO);
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         rc = ost_punch_lock_get(exp, oinfo.oi_oa, &lh);
         if (rc == 0) {
                 if (oinfo.oi_oa->o_valid & OBD_MD_FLFLAGS &&
@@ -330,9 +335,14 @@ static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
                          */
                         oinfo.oi_oa->o_valid &= ~OBD_MD_FLFLAGS;
 
-                if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA)
-                        oinfo.oi_capa = lustre_unpack_incoming_capa(req,
-                                                           REQ_REC_OFF + 1);
+                if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA) {
+                        oinfo.oi_capa = req_capsule_client_get(&req->rq_pill,
+                                                               &RMF_CAPA1);
+                        if (oinfo.oi_capa == NULL) {
+                                CERROR("Missing capability for OST PUNCH");
+                                RETURN (-EFAULT);
+                        }
+                }
                 req->rq_status = obd_punch(exp, &oinfo, oti, NULL);
                 ost_punch_lock_put(exp, oinfo.oi_oa, &lh);
         }
@@ -345,24 +355,26 @@ static int ost_sync(struct obd_export *exp, struct ptlrpc_request *req)
 {
         struct ost_body *body, *repbody;
         struct lustre_capa *capa = NULL;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
         int rc;
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL)
                 RETURN(-EFAULT);
 
-        if (body->oa.o_valid & OBD_MD_FLOSSCAPA)
-                capa = lustre_unpack_incoming_capa(req, REQ_REC_OFF + 1);
+        if (body->oa.o_valid & OBD_MD_FLOSSCAPA) {
+                capa = req_capsule_client_get(&req->rq_pill, &RMF_CAPA1);
+                if (capa == NULL) {
+                        CERROR("Missing capability for OST SYNC");
+                        RETURN (-EFAULT);
+                }
+        }
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
         req->rq_status = obd_sync(exp, &repbody->oa, NULL, repbody->oa.o_size,
                                   repbody->oa.o_blocks, capa);
@@ -374,28 +386,30 @@ static int ost_setattr(struct obd_export *exp, struct ptlrpc_request *req,
                        struct obd_trans_info *oti)
 {
         struct ost_body *body, *repbody;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
         int rc;
         struct obd_info oinfo = { { { 0 } } };
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
         if (body == NULL)
                 RETURN(-EFAULT);
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 RETURN(rc);
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         repbody->oa = body->oa;
 
         oinfo.oi_oa = &repbody->oa;
-        if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA)
-                oinfo.oi_capa = lustre_unpack_incoming_capa(req,
-                                                   REQ_REC_OFF + 1);
+        if (oinfo.oi_oa->o_valid & OBD_MD_FLOSSCAPA) {
+                oinfo.oi_capa = req_capsule_client_get(&req->rq_pill,
+                                                       &RMF_CAPA1);
+                if (oinfo.oi_capa == NULL) {
+                        CERROR("Missing capability for OST SETATTR");
+                        RETURN (-EFAULT);
+                }
+        }
         req->rq_status = obd_setattr(exp, &oinfo, oti);
         ost_drop_id(exp, &repbody->oa);
         RETURN(0);
@@ -461,10 +475,10 @@ static int ost_brw_lock_get(int mode, struct obd_export *exp,
         if (nrbufs == 0 || !(nb[0].flags & OBD_BRW_SRVLOCK))
                 RETURN(0);
 
-        /* EXPENSIVE ASSERTION */
         for (i = 1; i < nrbufs; i ++)
-                LASSERT((nb[0].flags & OBD_BRW_SRVLOCK) ==
-                        (nb[i].flags & OBD_BRW_SRVLOCK));
+                if ((nb[0].flags & OBD_BRW_SRVLOCK) !=
+                    (nb[i].flags & OBD_BRW_SRVLOCK))
+                        RETURN(-EFAULT);
 
         policy.l_extent.start = nb[0].offset & CFS_PAGE_MASK;
         policy.l_extent.end   = (nb[nrbufs - 1].offset +
@@ -473,8 +487,7 @@ static int ost_brw_lock_get(int mode, struct obd_export *exp,
         RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
                                       LDLM_EXTENT, &policy, mode, &flags,
                                       ldlm_blocking_ast, ldlm_completion_ast,
-                                      ldlm_glimpse_ast, NULL, 0, NULL,
-                                      NULL, lh));
+                                      ldlm_glimpse_ast, NULL, 0, NULL, lh));
 }
 
 static void ost_brw_lock_put(int mode,
@@ -619,7 +632,6 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
         struct lustre_capa *capa = NULL;
         struct l_wait_info lwi;
         struct lustre_handle lockh = { 0 };
-        __u32  size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         int niocount, npages, nob = 0, rc, i;
         int no_reply = 0;
         ENTRY;
@@ -644,21 +656,34 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
 
         /* ost_body, ioobj & noibuf_remote are verified and swabbed in
          * ost_rw_hpreq_check(). */
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                GOTO(out, rc = -EFAULT);
 
-        ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, sizeof(*ioo));
-        LASSERT(ioo != NULL);
+        /*
+         * A req_capsule_X_get_array(pill, field, ptr_to_element_count) function
+         * would be useful here and wherever we get &RMF_OBD_IOOBJ and
+         * &RMF_NIOBUF_REMOTE.
+         */
+        ioo = req_capsule_client_get(&req->rq_pill, &RMF_OBD_IOOBJ);
+        if (ioo == NULL)
+                GOTO(out, rc = -EFAULT);
 
         niocount = ioo->ioo_bufcnt;
-        remote_nb = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                                   niocount * sizeof(*remote_nb));
-        LASSERT(remote_nb != NULL);
+        remote_nb = req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE);
+        if (remote_nb == NULL)
+                GOTO(out, rc = -EFAULT);
 
-        if (body->oa.o_valid & OBD_MD_FLOSSCAPA)
-                capa = lustre_unpack_incoming_capa(req, REQ_REC_OFF + 3);
+        if (body->oa.o_valid & OBD_MD_FLOSSCAPA) {
+                capa = req_capsule_client_get(&req->rq_pill, &RMF_CAPA1);
+                if (capa == NULL) {
+                        CERROR("Missing capability for OST BRW READ");
+                        GOTO(out, rc = -EFAULT);
+                }
+        }
 
-        rc = lustre_pack_reply(req, 2, size, NULL);
+        req_capsule_set_size(&req->rq_pill, &RMF_RCS, RCL_SERVER, 0);
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc)
                 GOTO(out, rc);
 
@@ -823,8 +848,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
                           remote_nb, npages, local_nb, oti, rc);
 
         if (rc == 0) {
-                repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                         sizeof(*repbody));
+                repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
                 memcpy(&repbody->oa, &body->oa, sizeof(repbody->oa));
                 ost_drop_id(exp, &repbody->oa);
         }
@@ -872,7 +896,6 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         struct lustre_handle     lockh = {0};
         struct lustre_capa      *capa = NULL;
         __u32                   *rcs;
-        __u32 size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         int objcount, niocount, npages;
         int rc, i, j;
         obd_count                client_cksum = 0, server_cksum = 0;
@@ -904,35 +927,47 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
 
         /* ost_body, ioobj & noibuf_remote are verified and swabbed in
          * ost_rw_hpreq_check(). */
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                GOTO(out, rc = -EFAULT);
 
         if ((body->oa.o_flags & OBD_BRW_MEMALLOC) &&
             (exp->exp_connection->c_peer.nid == exp->exp_connection->c_self))
                 libcfs_memory_pressure_set();
 
-        objcount = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1) /
-                sizeof(*ioo);
-        ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1,
-                             objcount * sizeof(*ioo));
-        LASSERT(ioo != NULL);
+        objcount = req_capsule_get_size(&req->rq_pill, &RMF_OBD_IOOBJ,
+                                        RCL_CLIENT) / sizeof(*ioo);
+        ioo = req_capsule_client_get(&req->rq_pill, &RMF_OBD_IOOBJ);
+        if (ioo == NULL)
+                GOTO(out, rc = -EFAULT);
         for (niocount = i = 0; i < objcount; i++)
                 niocount += ioo[i].ioo_bufcnt;
 
-        remote_nb = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                                   niocount * sizeof(*remote_nb));
-        LASSERT(remote_nb != NULL);
+        /*
+         * It'd be nice to have a capsule function to indicate how many elements
+         * there were in a buffer for an RMF that's declared to be an array.
+         * It's easy enough to compute the number of elements here though.
+         */
+        remote_nb = req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE);
+        if (remote_nb == NULL || niocount != (req_capsule_get_size(&req->rq_pill,
+            &RMF_NIOBUF_REMOTE, RCL_CLIENT) / sizeof(*remote_nb)))
+                GOTO(out, rc = -EFAULT);
 
-        if (body->oa.o_valid & OBD_MD_FLOSSCAPA)
-                capa = lustre_unpack_incoming_capa(req, REQ_REC_OFF + 3);
+        if (body->oa.o_valid & OBD_MD_FLOSSCAPA) {
+                capa = req_capsule_client_get(&req->rq_pill, &RMF_CAPA1);
+                if (capa == NULL) {
+                        CERROR("Missing capability for OST BRW WRITE");
+                        GOTO(out, rc = -EFAULT);
+                }
+        }
 
-        size[REPLY_REC_OFF + 1] = niocount * sizeof(*rcs);
-        rc = lustre_pack_reply(req, 3, size, NULL);
+        req_capsule_set_size(&req->rq_pill, &RMF_RCS, RCL_SERVER,
+                             niocount * sizeof(*rcs));
+        rc = req_capsule_server_pack(&req->rq_pill);
         if (rc != 0)
                 GOTO(out, rc);
         OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_PACK, obd_fail_val);
-        rcs = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1,
-                             niocount * sizeof(*rcs));
+        rcs = req_capsule_server_get(&req->rq_pill, &RMF_RCS);
 
         /*
          * Per-thread array of struct niobuf_{local,remote}'s was allocated by
@@ -1058,8 +1093,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         }
         no_reply = rc != 0;
 
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
+        repbody = req_capsule_server_get(&req->rq_pill, &RMF_OST_BODY);
         memcpy(&repbody->oa, &body->oa, sizeof(repbody->oa));
 
         if (unlikely(client_cksum != 0 && rc == 0)) {
@@ -1084,6 +1118,12 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         /* Must commit after prep above in all cases */
         rc = obd_commitrw(OBD_BRW_WRITE, exp, &repbody->oa, objcount, ioo,
                           remote_nb, npages, local_nb, oti, rc);
+        if (rc == -ENOTCONN)
+                /* quota acquire process has been given up because
+                 * either the client has been evicted or the client
+                 * has timed out the request already */
+                no_reply = 1;
+
         if (exp_connect_rmtclient(exp)) {
                 repbody->oa.o_uid = o_uid;
                 repbody->oa.o_gid = o_gid;
@@ -1181,47 +1221,64 @@ out:
         RETURN(rc);
 }
 
+/**
+ * Implementation of OST_SET_INFO.
+ *
+ * OST_SET_INFO is like ioctl(): heavily overloaded.  Specifically, it takes a
+ * "key" and a value RPC buffers as arguments, with the value's contents
+ * interpreted according to the key.
+ *
+ * Value types that need swabbing have swabbing done explicitly, either here or
+ * in functions called from here.  This should be corrected: all swabbing should
+ * be done in the capsule abstraction, as that will then allow us to move
+ * swabbing exclusively to the client without having to modify server code
+ * outside the capsule abstraction's implementation itself.  To correct this
+ * will require minor changes to the capsule abstraction; see the comments for
+ * req_capsule_extend() in layout.c.
+ */
 static int ost_set_info(struct obd_export *exp, struct ptlrpc_request *req)
 {
         struct ost_body *body = NULL, *repbody;
-        __u32 size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
         char *key, *val = NULL;
         int keylen, vallen, rc = 0;
+        int is_grant_shrink = 0;
         ENTRY;
 
-        key = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, 1);
+        key = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_KEY);
         if (key == NULL) {
                 DEBUG_REQ(D_HA, req, "no set_info key");
                 RETURN(-EFAULT);
         }
-        keylen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF);
+        keylen = req_capsule_get_size(&req->rq_pill, &RMF_SETINFO_KEY,
+                                      RCL_CLIENT);
 
-        if (KEY_IS(KEY_GRANT_SHRINK)) {
-                rc = lustre_pack_reply(req, 2, size, NULL);
-                if (rc)
-                        RETURN(rc);
-        } else {
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        RETURN(rc);
-        }
+        vallen = req_capsule_get_size(&req->rq_pill, &RMF_SETINFO_VAL,
+                                      RCL_CLIENT);
+
+        if ((is_grant_shrink = KEY_IS(KEY_GRANT_SHRINK)))
+                /* In this case the value is actually an RMF_OST_BODY, so we
+                 * transmutate the type of this PTLRPC */
+                req_capsule_extend(&req->rq_pill, &RQF_OST_SET_GRANT_INFO);
+
+        rc = req_capsule_server_pack(&req->rq_pill);
+        if (rc)
+                RETURN(rc);
 
-        vallen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1);
         if (vallen) {
-                if (KEY_IS(KEY_GRANT_SHRINK)) {
-                        body = lustre_swab_reqbuf(req, REQ_REC_OFF + 1,
-                                                  sizeof(*body),
-                                                  lustre_swab_ost_body);
+                if (is_grant_shrink) {
+                        body = req_capsule_client_get(&req->rq_pill,
+                                                      &RMF_OST_BODY);
                         if (!body)
                                 RETURN(-EFAULT);
 
-                        repbody = lustre_msg_buf(req->rq_repmsg,
-                                                 REPLY_REC_OFF,
-                                                 sizeof(*repbody));
+                        repbody = req_capsule_server_get(&req->rq_pill,
+                                                         &RMF_OST_BODY);
                         memcpy(repbody, body, sizeof(*body));
                         val = (char*)repbody;
-                } else
-                        val = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1,0);
+                } else {
+                        val = req_capsule_client_get(&req->rq_pill,
+                                                     &RMF_SETINFO_VAL);
+                }
         }
 
         if (KEY_IS(KEY_EVICT_BY_NID)) {
@@ -1229,10 +1286,13 @@ static int ost_set_info(struct obd_export *exp, struct ptlrpc_request *req)
                         obd_export_evict_by_nid(exp->exp_obd, val);
                 GOTO(out, rc = 0);
         } else if (KEY_IS(KEY_MDS_CONN) && ptlrpc_req_need_swab(req)) {
-                /* Val's are not swabbed automatically */
+                if (vallen < sizeof(__u32))
+                        RETURN(-EFAULT);
                 __swab32s((__u32 *)val);
         }
 
+        /* OBD will also check if KEY_IS(KEY_GRANT_SHRINK), and will cast val to
+         * a struct ost_body * value */
         rc = obd_set_info_async(exp, keylen, key, vallen, val, NULL);
 out:
         lustre_msg_set_status(req->rq_repmsg, 0);
@@ -1246,8 +1306,6 @@ static int ost_get_info(struct obd_export *exp, struct ptlrpc_request *req)
         struct req_capsule *pill = &req->rq_pill;
         ENTRY;
 
-        req_capsule_set(&req->rq_pill, &RQF_OST_GET_INFO_GENERIC);
-
         /* this common part for get_info rpc */
         key = req_capsule_client_get(pill, &RMF_SETINFO_KEY);
         if (key == NULL) {
@@ -1351,7 +1409,7 @@ static int ost_llog_handle_connect(struct obd_export *exp,
         int rc;
         ENTRY;
 
-        body = lustre_msg_buf(req->rq_reqmsg, 1, sizeof(*body));
+        body = req_capsule_client_get(&req->rq_pill, &RMF_LLOGD_CONN_BODY);
         rc = obd_llog_connect(exp, body);
         RETURN(rc);
 }
@@ -1628,6 +1686,10 @@ int ost_msg_check_version(struct lustre_msg *msg)
         return rc;
 }
 
+/**
+ * Returns 1 if the given PTLRPC matches the given LDLM locks, or 0 if it does
+ * not.
+ */
 static int ost_rw_hpreq_lock_match(struct ptlrpc_request *req,
                                    struct ldlm_lock *lock)
 {
@@ -1644,19 +1706,24 @@ static int ost_rw_hpreq_lock_match(struct ptlrpc_request *req,
 
         /* As the request may be covered by several locks, do not look at
          * o_handle, look at the RPC IO region. */
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_obdo);
-        objcount = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1) /
-                sizeof(*ioo);
-        ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1,
-                             objcount * sizeof(*ioo));
-        LASSERT(ioo != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                RETURN(0);
+
+        objcount = req_capsule_get_size(&req->rq_pill, &RMF_OBD_IOOBJ,
+                                        RCL_CLIENT) / sizeof(*ioo);
+        ioo = req_capsule_client_get(&req->rq_pill, &RMF_OBD_IOOBJ);
+        if (ioo == NULL)
+                RETURN(0);
+
         for (niocount = i = 0; i < objcount; i++)
                 niocount += ioo[i].ioo_bufcnt;
 
-        nb = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                            niocount * sizeof(*nb));
-        LASSERT(nb != NULL);
+        nb = req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE);
+        if (nb == NULL ||
+            niocount != (req_capsule_get_size(&req->rq_pill, &RMF_NIOBUF_REMOTE,
+            RCL_CLIENT) / sizeof(*nb)))
+                RETURN(0);
 
         mode = LCK_PW;
         if (opc == OST_READ)
@@ -1682,9 +1749,14 @@ static int ost_rw_hpreq_lock_match(struct ptlrpc_request *req,
 }
 
 /**
- * Swab buffers needed to call ost_rw_prolong_locks() and call it.
- * Return the value from ost_rw_prolong_locks() which is non-zero if
- * there is a cancelled lock which is waiting for this IO request.
+ * High-priority queue request check for whether the given PTLRPC request (\a
+ * req) is blocking an LDLM lock cancel.
+ *
+ * Returns 1 if the given given PTLRPC request (\a req) is blocking an LDLM lock
+ * cancel, 0 if it is not, and -EFAULT if the request is malformed.
+ *
+ * Only OST_READs, OST_WRITEs and OST_PUNCHes go on the h-p RPC queue.  This
+ * function looks only at OST_READs and OST_WRITEs.
  */
 static int ost_rw_hpreq_check(struct ptlrpc_request *req)
 {
@@ -1698,21 +1770,25 @@ static int ost_rw_hpreq_check(struct ptlrpc_request *req)
         opc = lustre_msg_get_opc(req->rq_reqmsg);
         LASSERT(opc == OST_READ || opc == OST_WRITE);
 
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                RETURN(-EFAULT);
 
-        objcount = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1) /
-                sizeof(*ioo);
-        ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1,
-                             objcount * sizeof(*ioo));
-        LASSERT(ioo != NULL);
+        objcount = req_capsule_get_size(&req->rq_pill, &RMF_OBD_IOOBJ,
+                                        RCL_CLIENT) / sizeof(*ioo);
+        ioo = req_capsule_client_get(&req->rq_pill, &RMF_OBD_IOOBJ);
+        if (ioo == NULL)
+                RETURN(-EFAULT);
 
         for (niocount = i = 0; i < objcount; i++)
                 niocount += ioo[i].ioo_bufcnt;
-        nb = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                            niocount * sizeof(*nb));
-        LASSERT(nb != NULL);
-        LASSERT(niocount == 0 || !(nb[0].flags & OBD_BRW_SRVLOCK));
+        nb = req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE);
+        if (nb == NULL ||
+            niocount != (req_capsule_get_size(&req->rq_pill, &RMF_NIOBUF_REMOTE,
+            RCL_CLIENT) / sizeof(*nb)))
+                RETURN(-EFAULT);
+        if (niocount != 0 && (nb[0].flags & OBD_BRW_SRVLOCK))
+                RETURN(-EFAULT);
 
         mode = LCK_PW;
         if (opc == OST_READ)
@@ -1754,15 +1830,18 @@ static int ost_punch_prolong_locks(struct ptlrpc_request *req, struct obdo *oa)
         RETURN(opd.opd_lock_match);
 }
 
+/**
+ * Like ost_rw_hpreq_lock_match(), but for OST_PUNCH RPCs.
+ */
 static int ost_punch_hpreq_lock_match(struct ptlrpc_request *req,
                                       struct ldlm_lock *lock)
 {
         struct ost_body *body;
         ENTRY;
 
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_obdo);
-        LASSERT(body != NULL);
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                RETURN(0);  /* can't return -EFAULT here */
 
         if (body->oa.o_valid & OBD_MD_FLHANDLE &&
             body->oa.o_handle.cookie == lock->l_handle.h_cookie)
@@ -1770,11 +1849,17 @@ static int ost_punch_hpreq_lock_match(struct ptlrpc_request *req,
         RETURN(0);
 }
 
+/**
+ * Like ost_rw_hpreq_check(), but for OST_PUNCH RPCs.
+ */
 static int ost_punch_hpreq_check(struct ptlrpc_request *req)
 {
-        struct ost_body *body = lustre_msg_buf(req->rq_reqmsg,
-                                               REQ_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);
+        struct ost_body *body;
+
+        body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
+        if (body == NULL)
+                RETURN(-EFAULT);
+
         LASSERT(!(body->oa.o_valid & OBD_MD_FLFLAGS) ||
                 !(body->oa.o_flags & OBD_FL_TRUNCLOCK));
 
@@ -1803,18 +1888,27 @@ static int ost_hpreq_handler(struct ptlrpc_request *req)
                         struct niobuf_remote *nb;
                         struct obd_ioobj *ioo;
                         int objcount, niocount;
-                        int swab, i;
+                        int i;
+
+                        /* RPCs on the H-P queue can be inspected before
+                         * ost_handler() initializes their pills, so we
+                         * initialize that here.  Capsule initialization is
+                         * idempotent, as is setting the pill's format (provided
+                         * it doesn't change).
+                         */
+                        req_capsule_init(&req->rq_pill, req, RCL_SERVER);
+                        req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
 
-                        body = lustre_swab_reqbuf(req, REQ_REC_OFF,
-                                                  sizeof(*body),
-                                                  lustre_swab_obdo);
-                        if (!body) {
+                        body = req_capsule_client_get(&req->rq_pill,
+                                                      &RMF_OST_BODY);
+                        if (body == NULL) {
                                 CERROR("Missing/short ost_body\n");
                                 RETURN(-EFAULT);
                         }
-                        objcount = lustre_msg_buflen(req->rq_reqmsg,
-                                                     REQ_REC_OFF + 1) /
-                                sizeof(*ioo);
+                        objcount = req_capsule_get_size(&req->rq_pill,
+                                                        &RMF_OBD_IOOBJ,
+                                                        RCL_CLIENT) /
+                                                        sizeof(*ioo);
                         if (objcount == 0) {
                                 CERROR("Missing/short ioobj\n");
                                 RETURN(-EFAULT);
@@ -1824,18 +1918,14 @@ static int ost_hpreq_handler(struct ptlrpc_request *req)
                                 RETURN(-EFAULT);
                         }
 
-                        ioo = lustre_swab_reqbuf(req, REQ_REC_OFF + 1,
-                                                 objcount * sizeof(*ioo),
-                                                 lustre_swab_obd_ioobj);
-                        if (!ioo) {
+                        ioo = req_capsule_client_get(&req->rq_pill,
+                                                     &RMF_OBD_IOOBJ);
+                        if (ioo == NULL) {
                                 CERROR("Missing/short ioobj\n");
                                 RETURN(-EFAULT);
                         }
 
-                        swab = ptlrpc_req_need_swab(req);
                         for (niocount = i = 0; i < objcount; i++) {
-                                if (i > 0 && swab)
-                                        lustre_swab_obd_ioobj(&ioo[i]);
                                 if (ioo[i].ioo_bufcnt == 0) {
                                         CERROR("ioo[%d] has zero bufcnt\n", i);
                                         RETURN(-EFAULT);
@@ -1843,33 +1933,28 @@ static int ost_hpreq_handler(struct ptlrpc_request *req)
                                 niocount += ioo[i].ioo_bufcnt;
                         }
                         if (niocount > PTLRPC_MAX_BRW_PAGES) {
-                                DEBUG_REQ(D_ERROR, req, "bulk has too many "
-                                          "pages (%d)", niocount);
+                                DEBUG_REQ(D_RPCTRACE, req,
+                                          "bulk has too many pages (%d)",
+                                          niocount);
                                 RETURN(-EFAULT);
                         }
 
-                        nb = lustre_swab_reqbuf(req, REQ_REC_OFF + 2,
-                                                niocount * sizeof(*nb),
-                                                lustre_swab_niobuf_remote);
-                        if (!nb) {
+                        nb = req_capsule_client_get(&req->rq_pill,
+                                                    &RMF_NIOBUF_REMOTE);
+                        if (nb == NULL) {
                                 CERROR("Missing/short niobuf\n");
                                 RETURN(-EFAULT);
                         }
 
-                        swab = ptlrpc_req_need_swab(req);
-                        if (swab) {
-                                /* swab remaining niobufs */
-                                for (i = 1; i < niocount; i++)
-                                        lustre_swab_niobuf_remote(&nb[i]);
-                        }
-
                         if (niocount == 0 || !(nb[0].flags & OBD_BRW_SRVLOCK))
                                 req->rq_ops = &ost_hpreq_rw;
                 } else if (opc == OST_PUNCH) {
-                        body = lustre_swab_reqbuf(req, REQ_REC_OFF,
-                                                  sizeof(*body),
-                                                  lustre_swab_obdo);
-                        if (!body) {
+                        req_capsule_init(&req->rq_pill, req, RCL_SERVER);
+                        req_capsule_set(&req->rq_pill, &RQF_OST_PUNCH);
+
+                        body = req_capsule_client_get(&req->rq_pill,
+                                                      &RMF_OST_BODY);
+                        if (body == NULL) {
                                 CERROR("Missing/short ost_body\n");
                                 RETURN(-EFAULT);
                         }
@@ -1903,11 +1988,10 @@ int ost_handle(struct ptlrpc_request *req)
 
         req_capsule_init(&req->rq_pill, req, RCL_SERVER);
 
-        /* XXX identical to MDS */
         if (lustre_msg_get_opc(req->rq_reqmsg) != OST_CONNECT) {
                 int recovering;
 
-                if (req->rq_export == NULL) {
+                if (!class_connected_export(req->rq_export)) {
                         CDEBUG(D_HA,"operation %d on unconnected OST from %s\n",
                                lustre_msg_get_opc(req->rq_reqmsg),
                                libcfs_id2str(req->rq_peer));
@@ -1965,16 +2049,16 @@ int ost_handle(struct ptlrpc_request *req)
                 break;
         case OST_CREATE:
                 CDEBUG(D_INODE, "create\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_CREATE);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_CREATE_NET))
                         RETURN(0);
-                if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOSPC))
-                        GOTO(out, rc = -ENOSPC);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
                         GOTO(out, rc = -EROFS);
                 rc = ost_create(req->rq_export, req, oti);
                 break;
         case OST_DESTROY:
                 CDEBUG(D_INODE, "destroy\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_DESTROY);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_DESTROY_NET))
                         RETURN(0);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
@@ -1983,17 +2067,20 @@ int ost_handle(struct ptlrpc_request *req)
                 break;
         case OST_GETATTR:
                 CDEBUG(D_INODE, "getattr\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_GETATTR);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_GETATTR_NET))
                         RETURN(0);
                 rc = ost_getattr(req->rq_export, req);
                 break;
         case OST_SETATTR:
                 CDEBUG(D_INODE, "setattr\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_SETATTR);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_SETATTR_NET))
                         RETURN(0);
                 rc = ost_setattr(req->rq_export, req, oti);
                 break;
         case OST_WRITE:
+                req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
                 CDEBUG(D_INODE, "write\n");
                 /* req->rq_request_portal would be nice, if it was set */
                 if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){
@@ -2014,6 +2101,7 @@ int ost_handle(struct ptlrpc_request *req)
                 /* ost_brw_write sends its own replies */
                 RETURN(rc);
         case OST_READ:
+                req_capsule_set(&req->rq_pill, &RQF_OST_BRW);
                 CDEBUG(D_INODE, "read\n");
                 /* req->rq_request_portal would be nice, if it was set */
                 if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){
@@ -2031,6 +2119,7 @@ int ost_handle(struct ptlrpc_request *req)
                 RETURN(rc);
         case OST_PUNCH:
                 CDEBUG(D_INODE, "punch\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_PUNCH);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_PUNCH_NET))
                         RETURN(0);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
@@ -2039,12 +2128,14 @@ int ost_handle(struct ptlrpc_request *req)
                 break;
         case OST_STATFS:
                 CDEBUG(D_INODE, "statfs\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_STATFS);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_STATFS_NET))
                         RETURN(0);
                 rc = ost_statfs(req);
                 break;
         case OST_SYNC:
                 CDEBUG(D_INODE, "sync\n");
+                req_capsule_set(&req->rq_pill, &RQF_OST_SYNC);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_SYNC_NET))
                         RETURN(0);
                 rc = ost_sync(req->rq_export, req);
@@ -2056,6 +2147,7 @@ int ost_handle(struct ptlrpc_request *req)
                 break;
         case OST_GET_INFO:
                 DEBUG_REQ(D_INODE, req, "get_info");
+                req_capsule_set(&req->rq_pill, &RQF_OST_GET_INFO_GENERIC);
                 rc = ost_get_info(req->rq_export, req);
                 break;
 #ifdef HAVE_QUOTA_SUPPORT
index 73864f3..f0d2f87 100644 (file)
@@ -1061,7 +1061,8 @@ static int after_reply(struct ptlrpc_request *req)
                 RETURN(-EPROTO);
         }
 
-        OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_PAUSE_REP, obd_fail_val);
+        if (lustre_msg_get_opc(req->rq_reqmsg) != OBD_PING)
+                OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_PAUSE_REP, obd_fail_val);
         ptlrpc_at_adj_service(req, lustre_msg_get_timeout(req->rq_repmsg));
         ptlrpc_at_adj_net_latency(req,
                                   lustre_msg_get_service_time(req->rq_repmsg));
@@ -2135,7 +2136,7 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
                 return;
         }
 
-        list_add_tail(&req->rq_replay_list, &imp->imp_replay_list);
+        list_add(&req->rq_replay_list, &imp->imp_replay_list);
 }
 
 int ptlrpc_queue_wait(struct ptlrpc_request *req)
index 1a38b4b..a4dac74 100644 (file)
 #endif
 
 #include "ptlrpc_internal.h"
-#include <class_hash.h>
 
-static lustre_hash_t *conn_hash = NULL;
-static lustre_hash_ops_t conn_hash_ops;
+static cfs_hash_t *conn_hash = NULL;
+static cfs_hash_ops_t conn_hash_ops;
 
 struct ptlrpc_connection *
 ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self,
@@ -56,7 +55,7 @@ ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self,
         struct ptlrpc_connection *conn, *conn2;
         ENTRY;
 
-        conn = lustre_hash_lookup(conn_hash, &peer);
+        conn = cfs_hash_lookup(conn_hash, &peer);
         if (conn)
                 GOTO(out, conn);
 
@@ -77,7 +76,7 @@ ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self,
          * connection.  The object which exists in the has will be
          * returned and may be compared against out object.
          */
-        conn2 = lustre_hash_findadd_unique(conn_hash, &peer, &conn->c_hash);
+        conn2 = cfs_hash_findadd_unique(conn_hash, &peer, &conn->c_hash);
         if (conn != conn2) {
                 OBD_FREE_PTR(conn);
                 conn = conn2;
@@ -143,10 +142,10 @@ int ptlrpc_connection_init(void)
 {
         ENTRY;
 
-        conn_hash = lustre_hash_init("CONN_HASH",
-                                     HASH_CONN_CUR_BITS,
-                                     HASH_CONN_MAX_BITS,
-                                     &conn_hash_ops, LH_REHASH);
+        conn_hash = cfs_hash_create("CONN_HASH",
+                                    HASH_CONN_CUR_BITS,
+                                    HASH_CONN_MAX_BITS,
+                                    &conn_hash_ops, CFS_HASH_REHASH);
         if (!conn_hash)
                 RETURN(-ENOMEM);
 
@@ -155,7 +154,7 @@ int ptlrpc_connection_init(void)
 
 void ptlrpc_connection_fini(void) {
         ENTRY;
-        lustre_hash_exit(conn_hash);
+        cfs_hash_destroy(conn_hash);
         EXIT;
 }
 
@@ -163,9 +162,9 @@ void ptlrpc_connection_fini(void) {
  * Hash operations for net_peer<->connection
  */
 static unsigned
-conn_hashfn(lustre_hash_t *lh,  void *key, unsigned mask)
+conn_hashfn(cfs_hash_t *hs,  void *key, unsigned mask)
 {
-        return lh_djb2_hash(key, sizeof(lnet_process_id_t), mask);
+        return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask);
 }
 
 static int
@@ -229,11 +228,11 @@ conn_exit(struct hlist_node *hnode)
         OBD_FREE_PTR(conn);
 }
 
-static lustre_hash_ops_t conn_hash_ops = {
-        .lh_hash    = conn_hashfn,
-        .lh_compare = conn_compare,
-        .lh_key     = conn_key,
-        .lh_get     = conn_get,
-        .lh_put     = conn_put,
-        .lh_exit    = conn_exit,
+static cfs_hash_ops_t conn_hash_ops = {
+        .hs_hash    = conn_hashfn,
+        .hs_compare = conn_compare,
+        .hs_key     = conn_key,
+        .hs_get     = conn_get,
+        .hs_put     = conn_put,
+        .hs_exit    = conn_exit,
 };
index af8ce40..e6cde5c 100644 (file)
@@ -806,8 +806,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env,
         if (rc) {
                 /* if this reconnect to busy export - not need select new target
                  * for connecting*/
-                if (ptlrpc_busy_reconnect(rc))
-                        imp->imp_force_reconnect = 1;
+                imp->imp_force_reconnect = ptlrpc_busy_reconnect(rc);
                 spin_unlock(&imp->imp_lock);
                 GOTO(out, rc);
         }
index 4e4a78c..4cddc07 100644 (file)
  *
  * Author: Nikita Danilov <nikita@clusterfs.com>
  */
+/*
+ * This file contains the "capsule/pill" abstraction layered above PTLRPC.
+ *
+ * Every struct ptlrpc_request contains a "pill", which points to a description
+ * of the format that the request conforms to.
+ */
 
 #if !defined(__REQ_LAYOUT_USER__)
 
 /* struct ptlrpc_request, lustre_msg* */
 #include <lustre_req_layout.h>
 #include <lustre_acl.h>
+#include <lustre_debug.h>
 
 /*
- * empty set of fields... for suitable definition of emptiness.
+ * RQFs (see below) refer to two struct req_msg_field arrays describing the
+ * client request and server reply, respectively.
  */
+/* empty set of fields... for suitable definition of emptiness. */
 static const struct req_msg_field *empty[] = {
         &RMF_PTLRPC_BODY
 };
@@ -286,6 +295,12 @@ static const struct req_msg_field *obd_set_info_client[] = {
         &RMF_SETINFO_VAL
 };
 
+static const struct req_msg_field *ost_grant_shrink_client[] = {
+        &RMF_PTLRPC_BODY,
+        &RMF_SETINFO_KEY,
+        &RMF_OST_BODY
+};
+
 static const struct req_msg_field *mds_getinfo_client[] = {
         &RMF_PTLRPC_BODY,
         &RMF_GETINFO_KEY,
@@ -385,8 +400,7 @@ static const struct req_msg_field *ldlm_intent_open_client[] = {
         &RMF_CAPA1,
         &RMF_CAPA2,
         &RMF_NAME,
-        &RMF_EADATA,
-        &RMF_REC_JOINFILE
+        &RMF_EADATA
 };
 
 static const struct req_msg_field *ldlm_intent_unlink_client[] = {
@@ -498,7 +512,7 @@ static const struct req_msg_field *ost_brw_client[] = {
 static const struct req_msg_field *ost_brw_server[] = {
         &RMF_PTLRPC_BODY,
         &RMF_OST_BODY,
-        &RMF_NIOBUF_REMOTE
+        &RMF_RCS
 };
 
 static const struct req_msg_field *ost_get_info_generic_server[] = {
@@ -610,16 +624,31 @@ struct req_msg_field {
         __u32       rmf_flags;
         const char *rmf_name;
         /**
-         * Field length. (-1) means "variable length".
+         * Field length. (-1) means "variable length".  If the
+         * \a RMF_F_STRUCT_ARRAY flag is set the field is also variable-length,
+         * but the actual size must be a whole multiple of \a rmf_size.
          */
         int         rmf_size;
         void      (*rmf_swabber)(void *);
+        void      (*rmf_dumper)(void *);
         int         rmf_offset[ARRAY_SIZE(req_formats)][RCL_NR];
 };
 
 enum rmf_flags {
+        /**
+         * The field is a string, must be NUL-terminated.
+         */
         RMF_F_STRING = 1 << 0,
-        RMF_F_NO_SIZE_CHECK = 1 << 1
+        /**
+         * The field's buffer size need not match the declared \a rmf_size.
+         */
+        RMF_F_NO_SIZE_CHECK = 1 << 1,
+        /**
+         * The field's buffer size must be a whole multiple of the declared \a
+         * rmf_size and the \a rmf_swabber function must work on the declared \a
+         * rmf_size worth of bytes.
+         */
+        RMF_F_STRUCT_ARRAY = 1 << 2
 };
 
 struct req_capsule;
@@ -627,213 +656,219 @@ struct req_capsule;
 /*
  * Request fields.
  */
-#define DEFINE_MSGF(name, flags, size, swabber) {       \
-        .rmf_name    = (name),                          \
-        .rmf_flags   = (flags),                         \
-        .rmf_size    = (size),                          \
-        .rmf_swabber = (void (*)(void*))(swabber)       \
+#define DEFINE_MSGF(name, flags, size, swabber, dumper) {       \
+        .rmf_name    = (name),                                  \
+        .rmf_flags   = (flags),                                 \
+        .rmf_size    = (size),                                  \
+        .rmf_swabber = (void (*)(void*))(swabber),              \
+        .rmf_dumper  = (void (*)(void*))(dumper)                \
 }
 
 const struct req_msg_field RMF_GENERIC_DATA =
         DEFINE_MSGF("generic_data", 0,
-                    -1, NULL);
+                    -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_GENERIC_DATA);
 
 const struct req_msg_field RMF_MGS_TARGET_INFO =
         DEFINE_MSGF("mgs_target_info", 0,
                     sizeof(struct mgs_target_info),
-                    lustre_swab_mgs_target_info);
+                    lustre_swab_mgs_target_info, NULL);
 EXPORT_SYMBOL(RMF_MGS_TARGET_INFO);
 
 const struct req_msg_field RMF_MGS_SEND_PARAM =
         DEFINE_MSGF("mgs_send_param", 0,
                     sizeof(struct mgs_send_param),
-                    NULL);
+                    NULL, NULL);
 EXPORT_SYMBOL(RMF_MGS_SEND_PARAM);
 
 const struct req_msg_field RMF_SETINFO_VAL =
-        DEFINE_MSGF("setinfo_val", 0, -1, NULL);
+        DEFINE_MSGF("setinfo_val", 0, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_SETINFO_VAL);
 
 const struct req_msg_field RMF_GETINFO_KEY =
-        DEFINE_MSGF("getinfo_key", 0, -1, NULL);
+        DEFINE_MSGF("getinfo_key", 0, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_GETINFO_KEY);
 
 const struct req_msg_field RMF_GETINFO_VALLEN =
         DEFINE_MSGF("getinfo_vallen", 0,
-                    sizeof(__u32), lustre_swab_generic_32s);
+                    sizeof(__u32), lustre_swab_generic_32s, NULL);
 EXPORT_SYMBOL(RMF_GETINFO_VALLEN);
 
 const struct req_msg_field RMF_GETINFO_VAL =
-        DEFINE_MSGF("getinfo_val", 0, -1, NULL);
+        DEFINE_MSGF("getinfo_val", 0, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_GETINFO_VAL);
 
 const struct req_msg_field RMF_SEQ_OPC =
         DEFINE_MSGF("seq_query_opc", 0,
-                    sizeof(__u32), lustre_swab_generic_32s);
+                    sizeof(__u32), lustre_swab_generic_32s, NULL);
 EXPORT_SYMBOL(RMF_SEQ_OPC);
 
 const struct req_msg_field RMF_SEQ_RANGE =
         DEFINE_MSGF("seq_query_range", 0,
-                    sizeof(struct lu_seq_range), lustre_swab_lu_seq_range);
+                    sizeof(struct lu_seq_range),
+                    lustre_swab_lu_seq_range, NULL);
 EXPORT_SYMBOL(RMF_SEQ_RANGE);
 
 const struct req_msg_field RMF_FLD_OPC =
         DEFINE_MSGF("fld_query_opc", 0,
-                    sizeof(__u32), lustre_swab_generic_32s);
+                    sizeof(__u32), lustre_swab_generic_32s, NULL);
 EXPORT_SYMBOL(RMF_FLD_OPC);
 
 const struct req_msg_field RMF_FLD_MDFLD =
         DEFINE_MSGF("fld_query_mdfld", 0,
-                    sizeof(struct lu_seq_range), lustre_swab_lu_seq_range);
+                    sizeof(struct lu_seq_range),
+                    lustre_swab_lu_seq_range, NULL);
 EXPORT_SYMBOL(RMF_FLD_MDFLD);
 
 const struct req_msg_field RMF_MDT_BODY =
         DEFINE_MSGF("mdt_body", 0,
-                    sizeof(struct mdt_body), lustre_swab_mdt_body);
+                    sizeof(struct mdt_body), lustre_swab_mdt_body, NULL);
 EXPORT_SYMBOL(RMF_MDT_BODY);
 
 const struct req_msg_field RMF_OBD_QUOTACTL =
         DEFINE_MSGF("obd_quotactl", 0,
-                    sizeof(struct obd_quotactl), lustre_swab_obd_quotactl);
+                    sizeof(struct obd_quotactl),
+                    lustre_swab_obd_quotactl, NULL);
 EXPORT_SYMBOL(RMF_OBD_QUOTACTL);
 
 const struct req_msg_field RMF_QUOTA_ADJUST_QUNIT =
         DEFINE_MSGF("quota_adjust_qunit", 0,
                     sizeof(struct quota_adjust_qunit),
-                    lustre_swab_quota_adjust_qunit);
+                    lustre_swab_quota_adjust_qunit, NULL);
 EXPORT_SYMBOL(RMF_QUOTA_ADJUST_QUNIT);
 
 const struct req_msg_field RMF_QUNIT_DATA =
         DEFINE_MSGF("qunit_data", 0,
-                    sizeof(struct qunit_data), NULL);
+                    sizeof(struct qunit_data), lustre_swab_qdata, NULL);
 EXPORT_SYMBOL(RMF_QUNIT_DATA);
 
 const struct req_msg_field RMF_MDT_EPOCH =
         DEFINE_MSGF("mdt_epoch", 0,
-                    sizeof(struct mdt_epoch), lustre_swab_mdt_epoch);
+                    sizeof(struct mdt_epoch), lustre_swab_mdt_epoch, NULL);
 EXPORT_SYMBOL(RMF_MDT_EPOCH);
 
 const struct req_msg_field RMF_PTLRPC_BODY =
         DEFINE_MSGF("ptlrpc_body", 0,
-                    sizeof(struct ptlrpc_body), lustre_swab_ptlrpc_body);
+                    sizeof(struct ptlrpc_body), lustre_swab_ptlrpc_body, NULL);
 EXPORT_SYMBOL(RMF_PTLRPC_BODY);
 
 const struct req_msg_field RMF_OBD_STATFS =
         DEFINE_MSGF("obd_statfs", 0,
-                    sizeof(struct obd_statfs), lustre_swab_obd_statfs);
+                    sizeof(struct obd_statfs), lustre_swab_obd_statfs, NULL);
 EXPORT_SYMBOL(RMF_OBD_STATFS);
 
 const struct req_msg_field RMF_SETINFO_KEY =
-        DEFINE_MSGF("setinfo_key", 0, -1, NULL);
+        DEFINE_MSGF("setinfo_key", 0, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_SETINFO_KEY);
 
 const struct req_msg_field RMF_NAME =
-        DEFINE_MSGF("name", RMF_F_STRING, -1, NULL);
+        DEFINE_MSGF("name", RMF_F_STRING, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_NAME);
 
 const struct req_msg_field RMF_SYMTGT =
-        DEFINE_MSGF("symtgt", RMF_F_STRING, -1, NULL);
+        DEFINE_MSGF("symtgt", RMF_F_STRING, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_SYMTGT);
 
 const struct req_msg_field RMF_TGTUUID =
-        DEFINE_MSGF("tgtuuid", RMF_F_STRING, sizeof(struct obd_uuid) - 1, NULL);
+        DEFINE_MSGF("tgtuuid", RMF_F_STRING, sizeof(struct obd_uuid) - 1, NULL,
+        NULL);
 EXPORT_SYMBOL(RMF_TGTUUID);
 
 const struct req_msg_field RMF_CLUUID =
-        DEFINE_MSGF("cluuid", RMF_F_STRING, sizeof(struct obd_uuid) - 1, NULL);
+        DEFINE_MSGF("cluuid", RMF_F_STRING, sizeof(struct obd_uuid) - 1, NULL,
+        NULL);
 EXPORT_SYMBOL(RMF_CLUUID);
 
 const struct req_msg_field RMF_STRING =
-        DEFINE_MSGF("string", RMF_F_STRING, -1, NULL);
+        DEFINE_MSGF("string", RMF_F_STRING, -1, NULL, NULL);
 EXPORT_SYMBOL(RMF_STRING);
 
 const struct req_msg_field RMF_LLOGD_BODY =
         DEFINE_MSGF("llogd_body", 0,
-                    sizeof(struct llogd_body), lustre_swab_llogd_body);
+                    sizeof(struct llogd_body), lustre_swab_llogd_body, NULL);
 EXPORT_SYMBOL(RMF_LLOGD_BODY);
 
 const struct req_msg_field RMF_LLOG_LOG_HDR =
         DEFINE_MSGF("llog_log_hdr", 0,
-                    sizeof(struct llog_log_hdr), lustre_swab_llog_hdr);
+                    sizeof(struct llog_log_hdr), lustre_swab_llog_hdr, NULL);
 EXPORT_SYMBOL(RMF_LLOG_LOG_HDR);
 
 const struct req_msg_field RMF_LLOGD_CONN_BODY =
         DEFINE_MSGF("llogd_conn_body", 0,
                     sizeof(struct llogd_conn_body),
-                    lustre_swab_llogd_conn_body);
+                    lustre_swab_llogd_conn_body, NULL);
 EXPORT_SYMBOL(RMF_LLOGD_CONN_BODY);
 
 /*
  * connection handle received in MDS_CONNECT request.
  *
- * XXX no swabbing?
+ * No swabbing needed because struct lustre_handle contains only a 64-bit cookie
+ * that the client does not interpret at all.
  */
 const struct req_msg_field RMF_CONN =
-        DEFINE_MSGF("conn", 0, sizeof(struct lustre_handle), NULL);
+        DEFINE_MSGF("conn", 0, sizeof(struct lustre_handle), NULL, NULL);
 EXPORT_SYMBOL(RMF_CONN);
 
 const struct req_msg_field RMF_CONNECT_DATA =
         DEFINE_MSGF("cdata",
                     RMF_F_NO_SIZE_CHECK /* we allow extra space for interop */,
-                    sizeof(struct obd_connect_data), lustre_swab_connect);
+                    sizeof(struct obd_connect_data), lustre_swab_connect, NULL);
 EXPORT_SYMBOL(RMF_CONNECT_DATA);
 
 const struct req_msg_field RMF_DLM_REQ =
         DEFINE_MSGF("dlm_req", RMF_F_NO_SIZE_CHECK /* ldlm_request_bufsize */,
-                    sizeof(struct ldlm_request), lustre_swab_ldlm_request);
+                    sizeof(struct ldlm_request),
+                    lustre_swab_ldlm_request, NULL);
 EXPORT_SYMBOL(RMF_DLM_REQ);
 
 const struct req_msg_field RMF_DLM_REP =
         DEFINE_MSGF("dlm_rep", 0,
-                    sizeof(struct ldlm_reply), lustre_swab_ldlm_reply);
+                    sizeof(struct ldlm_reply), lustre_swab_ldlm_reply, NULL);
 EXPORT_SYMBOL(RMF_DLM_REP);
 
 const struct req_msg_field RMF_LDLM_INTENT =
         DEFINE_MSGF("ldlm_intent", 0,
-                    sizeof(struct ldlm_intent), lustre_swab_ldlm_intent);
+                    sizeof(struct ldlm_intent), lustre_swab_ldlm_intent, NULL);
 EXPORT_SYMBOL(RMF_LDLM_INTENT);
 
 const struct req_msg_field RMF_DLM_LVB =
-        DEFINE_MSGF("dlm_lvb", 0, sizeof(struct ost_lvb), NULL);
+        DEFINE_MSGF("dlm_lvb", 0, sizeof(struct ost_lvb), lustre_swab_ost_lvb,
+        NULL);
 EXPORT_SYMBOL(RMF_DLM_LVB);
 
 const struct req_msg_field RMF_MDT_MD =
-        DEFINE_MSGF("mdt_md", RMF_F_NO_SIZE_CHECK, MIN_MD_SIZE, NULL);
+        DEFINE_MSGF("mdt_md", RMF_F_NO_SIZE_CHECK, MIN_MD_SIZE, NULL, NULL);
 EXPORT_SYMBOL(RMF_MDT_MD);
 
 const struct req_msg_field RMF_REC_REINT =
         DEFINE_MSGF("rec_reint", 0, sizeof(struct mdt_rec_reint),
-                    lustre_swab_mdt_rec_reint);
+                    lustre_swab_mdt_rec_reint, NULL);
 EXPORT_SYMBOL(RMF_REC_REINT);
 
-const struct req_msg_field RMF_REC_JOINFILE =
-        DEFINE_MSGF("rec_joinfile", 0, sizeof(struct mdt_rec_join),
-                    lustre_swab_mdt_rec_join);
-EXPORT_SYMBOL(RMF_REC_JOINFILE);
-
 /* FIXME: this length should be defined as a macro */
-const struct req_msg_field RMF_EADATA = DEFINE_MSGF("eadata", 0, -1, NULL);
+const struct req_msg_field RMF_EADATA = DEFINE_MSGF("eadata", 0, -1,
+                                                    NULL, NULL);
 EXPORT_SYMBOL(RMF_EADATA);
 
 const struct req_msg_field RMF_ACL =
         DEFINE_MSGF("acl", RMF_F_NO_SIZE_CHECK,
-                    LUSTRE_POSIX_ACL_MAX_SIZE, NULL);
+                    LUSTRE_POSIX_ACL_MAX_SIZE, NULL, NULL);
 EXPORT_SYMBOL(RMF_ACL);
 
+/* FIXME: this should be made to use RMF_F_STRUCT_ARRAY */
 const struct req_msg_field RMF_LOGCOOKIES =
         DEFINE_MSGF("logcookies", RMF_F_NO_SIZE_CHECK /* multiple cookies */,
-                    sizeof(struct llog_cookie), NULL);
+                    sizeof(struct llog_cookie), NULL, NULL);
 EXPORT_SYMBOL(RMF_LOGCOOKIES);
 
 const struct req_msg_field RMF_CAPA1 =
         DEFINE_MSGF("capa", 0, sizeof(struct lustre_capa),
-                    lustre_swab_lustre_capa);
+                    lustre_swab_lustre_capa, NULL);
 EXPORT_SYMBOL(RMF_CAPA1);
 
 const struct req_msg_field RMF_CAPA2 =
         DEFINE_MSGF("capa", 0, sizeof(struct lustre_capa),
-                    lustre_swab_lustre_capa);
+                    lustre_swab_lustre_capa, NULL);
 EXPORT_SYMBOL(RMF_CAPA2);
 
 /*
@@ -841,30 +876,37 @@ EXPORT_SYMBOL(RMF_CAPA2);
  */
 const struct req_msg_field RMF_OST_BODY =
         DEFINE_MSGF("ost_body", 0,
-                    sizeof(struct ost_body), lustre_swab_ost_body);
+                    sizeof(struct ost_body), lustre_swab_ost_body, dump_ost_body);
 EXPORT_SYMBOL(RMF_OST_BODY);
 
 const struct req_msg_field RMF_OBD_IOOBJ =
-        DEFINE_MSGF("obd_ioobj", 0,
-                    sizeof(struct obd_ioobj), lustre_swab_obd_ioobj);
+        DEFINE_MSGF("obd_ioobj", RMF_F_STRUCT_ARRAY,
+                    sizeof(struct obd_ioobj), lustre_swab_obd_ioobj, dump_ioo);
 EXPORT_SYMBOL(RMF_OBD_IOOBJ);
 
 const struct req_msg_field RMF_NIOBUF_REMOTE =
-        DEFINE_MSGF("niobuf_remote", 0, -1, lustre_swab_niobuf_remote);
+        DEFINE_MSGF("niobuf_remote", RMF_F_STRUCT_ARRAY,
+                    sizeof(struct niobuf_remote), lustre_swab_niobuf_remote,
+                    dump_rniobuf);
 EXPORT_SYMBOL(RMF_NIOBUF_REMOTE);
 
+const struct req_msg_field RMF_RCS =
+        DEFINE_MSGF("niobuf_remote", RMF_F_STRUCT_ARRAY, sizeof(__u32),
+                    lustre_swab_generic_32s, dump_rcs);
+EXPORT_SYMBOL(RMF_RCS);
+
 const struct req_msg_field RMF_OBD_ID =
         DEFINE_MSGF("obd_id", 0,
-                    sizeof(obd_id), lustre_swab_ost_last_id);
+                    sizeof(obd_id), lustre_swab_ost_last_id, NULL);
 EXPORT_SYMBOL(RMF_OBD_ID);
 
 const struct req_msg_field RMF_FIEMAP_KEY =
         DEFINE_MSGF("fiemap", 0, sizeof(struct ll_fiemap_info_key),
-                    lustre_swab_fiemap);
+                    lustre_swab_fiemap, NULL);
 EXPORT_SYMBOL(RMF_FIEMAP_KEY);
 
 const struct req_msg_field RMF_FIEMAP_VAL =
-        DEFINE_MSGF("fiemap", 0, -1, lustre_swab_fiemap);
+        DEFINE_MSGF("fiemap", 0, -1, lustre_swab_fiemap, NULL);
 EXPORT_SYMBOL(RMF_FIEMAP_VAL);
 
 /*
@@ -1226,7 +1268,7 @@ const struct req_format RQF_OST_STATFS =
 EXPORT_SYMBOL(RQF_OST_STATFS);
 
 const struct req_format RQF_OST_SET_GRANT_INFO =
-        DEFINE_REQ_FMT0("OST_SET_GRANT_INFO", obd_set_info_client,
+        DEFINE_REQ_FMT0("OST_SET_GRANT_INFO", ost_grant_shrink_client,
                          ost_body_only);
 EXPORT_SYMBOL(RQF_OST_SET_GRANT_INFO);
 
@@ -1248,6 +1290,13 @@ EXPORT_SYMBOL(RQF_OST_GET_INFO_FIEMAP);
 
 #if !defined(__REQ_LAYOUT_USER__)
 
+/* Convenience macro */
+#define FMT_FIELD(fmt, i, j) (fmt)->rf_fields[(i)].d[(j)]
+
+/**
+ * Initializes the capsule abstraction by computing and setting the \a rf_idx
+ * field of RQFs and the \a rmf_offset field of RMFs.
+ */
 int req_layout_init(void)
 {
         int i;
@@ -1264,6 +1313,8 @@ int req_layout_init(void)
                                 struct req_msg_field *field;
 
                                 field = (typeof(field))rf->rf_fields[j].d[k];
+                                LASSERT(!(field->rmf_flags & RMF_F_STRUCT_ARRAY)
+                                        || field->rmf_size > 0);
                                 LASSERT(field->rmf_offset[i][j] == 0);
                                 /*
                                  * k + 1 to detect unused format/field
@@ -1282,6 +1333,14 @@ void req_layout_fini(void)
 }
 EXPORT_SYMBOL(req_layout_fini);
 
+/**
+ * Initializes the expected sizes of each RMF in a \a pill (\a rc_area) to -1.
+ *
+ * Actual/expected field sizes are set elsewhere in functions in this file:
+ * req_capsule_init(), req_capsule_server_pack(), req_capsule_set_size() and
+ * req_capsule_msg_size().  The \a rc_area information is used by.
+ * ptlrpc_request_set_replen().
+ */
 void req_capsule_init_area(struct req_capsule *pill)
 {
         int i;
@@ -1293,11 +1352,11 @@ void req_capsule_init_area(struct req_capsule *pill)
 }
 EXPORT_SYMBOL(req_capsule_init_area);
 
-/*
- * Initialize capsule.
+/**
+ * Initialize a pill.
  *
- * @area is an array of REQ_MAX_FIELD_NR elements, used to store sizes of
- * variable-sized fields.
+ * The \a location indicates whether the caller is executing on the client side
+ * (RCL_CLIENT) or server side (RCL_SERVER)..
  */
 void req_capsule_init(struct req_capsule *pill,
                       struct ptlrpc_request *req,
@@ -1305,10 +1364,27 @@ void req_capsule_init(struct req_capsule *pill,
 {
         LASSERT(location == RCL_SERVER || location == RCL_CLIENT);
 
+        /*
+         * Today all capsules are embedded in ptlrpc_request structs,
+         * but just in case that ever isn't the case, we don't reach
+         * into req unless req != NULL and pill is the one embedded in
+         * the req.
+         *
+         * The req->rq_pill_init flag makes it safe to initialize a pill
+         * twice, which might happen in the OST paths as a result of the
+         * high-priority RPC queue getting peeked at before ost_handle()
+         * handles an OST RPC.
+         */
+        if (req != NULL && pill == &req->rq_pill && req->rq_pill_init)
+                return;
+
         memset(pill, 0, sizeof *pill);
         pill->rc_req = req;
         pill->rc_loc = location;
         req_capsule_init_area(pill);
+
+        if (req != NULL && pill == &req->rq_pill)
+                req->rq_pill_init = 1;
 }
 EXPORT_SYMBOL(req_capsule_init);
 
@@ -1333,15 +1409,27 @@ static struct lustre_msg *__req_msg(const struct req_capsule *pill,
         return loc == RCL_CLIENT ? req->rq_reqmsg : req->rq_repmsg;
 }
 
+/**
+ * Set the format (\a fmt) of a \a pill; format changes are not allowed here
+ * (see req_capsule_extend()).
+ */
 void req_capsule_set(struct req_capsule *pill, const struct req_format *fmt)
 {
-        LASSERT(pill->rc_fmt == NULL);
+        LASSERT(pill->rc_fmt == NULL || pill->rc_fmt == fmt);
         LASSERT(__req_format_is_sane(fmt));
 
         pill->rc_fmt = fmt;
 }
 EXPORT_SYMBOL(req_capsule_set);
 
+/**
+ * Fills in any parts of the \a rc_area of a \a pill that haven't been filled in
+ * yet.
+
+ * \a rc_area is an array of REQ_MAX_FIELD_NR elements, used to store sizes of
+ * variable-sized fields.  The field sizes come from the declared \a rmf_size
+ * field of a \a pill's \a rc_fmt's RMF's.
+ */
 int req_capsule_filled_sizes(struct req_capsule *pill,
                            enum req_location loc)
 {
@@ -1355,7 +1443,12 @@ int req_capsule_filled_sizes(struct req_capsule *pill,
                         pill->rc_area[loc][i] =
                                             fmt->rf_fields[loc].d[i]->rmf_size;
                         if (pill->rc_area[loc][i] == -1) {
-                                /* skip the following fields */
+                                /*
+                                 * Skip the following fields.
+                                 *
+                                 * If this LASSERT() trips then you're missing a
+                                 * call to req_capsule_set_size().
+                                 */
                                 LASSERT(loc != RCL_SERVER);
                                 break;
                         }
@@ -1365,6 +1458,13 @@ int req_capsule_filled_sizes(struct req_capsule *pill,
 }
 EXPORT_SYMBOL(req_capsule_filled_sizes);
 
+/**
+ * Capsule equivalent of lustre_pack_request() and lustre_pack_reply().
+ *
+ * This function uses the \a pill's \a rc_area as filled in by
+ * req_capsule_set_size() or req_capsule_filled_sizes() (the latter is called by
+ * this function).
+ */
 int req_capsule_server_pack(struct req_capsule *pill)
 {
         const struct req_format *fmt;
@@ -1380,13 +1480,17 @@ int req_capsule_server_pack(struct req_capsule *pill)
                                pill->rc_area[RCL_SERVER], NULL);
         if (rc != 0) {
                 DEBUG_REQ(D_ERROR, pill->rc_req,
-                          "Cannot pack %d fields in format `%s': ",
-                          count, fmt->rf_name);
+                       "Cannot pack %d fields in format `%s': ",
+                       count, fmt->rf_name);
         }
         return rc;
 }
 EXPORT_SYMBOL(req_capsule_server_pack);
 
+/**
+ * Returns the PTLRPC request or reply (\a loc) buffer offset of a \a pill
+ * corresponding to the given RMF (\a field).
+ */
 static int __req_capsule_offset(const struct req_capsule *pill,
                                 const struct req_msg_field *field,
                                 enum req_location loc)
@@ -1403,17 +1507,99 @@ static int __req_capsule_offset(const struct req_capsule *pill,
         return offset;
 }
 
+/**
+ * Helper for __req_capsule_get(); swabs value / array of values and/or dumps
+ * them if desired.
+ */
+static
+void
+swabber_dumper_helper(struct req_capsule *pill,
+                      const struct req_msg_field *field,
+                      enum req_location loc,
+                      int offset,
+                      void *value, int len, int dump, void (*swabber)( void *))
+{
+        void    *p;
+        int     i;
+        int     n;
+        int     do_swab;
+        int     inout = loc == RCL_CLIENT;
+
+        swabber = swabber ?: field->rmf_swabber;
+
+        if (ptlrpc_buf_need_swab(pill->rc_req, inout, offset) &&
+            swabber != NULL && value != NULL)
+                do_swab = 1;
+        else
+                do_swab = 0;
+
+        if (!(field->rmf_flags & RMF_F_STRUCT_ARRAY)) {
+                if (dump && field->rmf_dumper) {
+                        CDEBUG(D_RPCTRACE, "Dump of %sfield %s follows\n",
+                               do_swab ? "unswabbed " : "", field->rmf_name);
+                        field->rmf_dumper(value);
+                }
+                if (!do_swab)
+                        return;
+                swabber(value);
+                ptlrpc_buf_set_swabbed(pill->rc_req, inout, offset);
+                if (dump) {
+                        CDEBUG(D_RPCTRACE, "Dump of swabbed field %s "
+                               "follows\n", field->rmf_name);
+                        field->rmf_dumper(value);
+                }
+
+                return;
+        }
+
+        /*
+         * We're swabbing an array; swabber() swabs a single array element, so
+         * swab every element.
+         */
+        LASSERT((len % field->rmf_size) == 0);
+        for (p = value, i = 0, n = len / field->rmf_size;
+             i < n;
+             i++, p += field->rmf_size) {
+                if (dump && field->rmf_dumper) {
+                        CDEBUG(D_RPCTRACE, "Dump of %sarray field %s, "
+                               "element %d follows\n",
+                               do_swab ? "unswabbed " : "", field->rmf_name, i);
+                        field->rmf_dumper(p);
+                }
+                if (!do_swab)
+                        continue;
+                swabber(p);
+                if (dump && field->rmf_dumper) {
+                        CDEBUG(D_RPCTRACE, "Dump of swabbed array field %s, "
+                               "element %d follows\n", field->rmf_name, i);
+                        field->rmf_dumper(value);
+                }
+        }
+        if (do_swab)
+                ptlrpc_buf_set_swabbed(pill->rc_req, inout, offset);
+}
+
+/**
+ * Returns the pointer to a PTLRPC request or reply (\a loc) buffer of a \a pill
+ * corresponding to the given RMF (\a field).
+ *
+ * The buffer will be swabbed using the given \a swabber.  If \a swabber == NULL
+ * then the \a rmf_swabber from the RMF will be used.  Soon there will be no
+ * calls to __req_capsule_get() with a non-NULL \a swabber; \a swabber will then
+ * be removed.  Fields with the \a RMF_F_STRUCT_ARRAY flag set will have each
+ * element of the array swabbed.
+ */
 static void *__req_capsule_get(struct req_capsule *pill,
                                const struct req_msg_field *field,
                                enum req_location loc,
-                               void (*swabber)( void *))
+                               void (*swabber)( void *),
+                               int dump)
 {
         const struct req_format *fmt;
         struct lustre_msg       *msg;
         void                    *value;
         int                      len;
         int                      offset;
-        int                      inout = loc == RCL_CLIENT;
 
         void *(*getter)(struct lustre_msg *m, int n, int minlen);
 
@@ -1437,86 +1623,193 @@ static void *__req_capsule_get(struct req_capsule *pill,
         getter = (field->rmf_flags & RMF_F_STRING) ?
                 (typeof(getter))lustre_msg_string : lustre_msg_buf;
 
-        if (pill->rc_area[loc][offset] != -1)
+        if (field->rmf_flags & RMF_F_STRUCT_ARRAY) {
+                /*
+                 * We've already asserted that field->rmf_size > 0 in
+                 * req_layout_init().
+                 */
+                len = lustre_msg_buflen(msg, offset);
+                if ((len % field->rmf_size) != 0) {
+                        CERROR("%s: array field size mismatch "
+                               "%d modulo %d != 0 (%d)\n",
+                               field->rmf_name, len, field->rmf_size, loc);
+                        return NULL;
+                }
+        } else if (pill->rc_area[loc][offset] != -1) {
                 len = pill->rc_area[loc][offset];
-        else
+        } else {
                 len = max(field->rmf_size, 0);
+        }
         value = getter(msg, offset, len);
 
-        swabber = swabber ?: field->rmf_swabber;
-        if (ptlrpc_buf_need_swab(pill->rc_req, inout, offset) &&
-            swabber != NULL && value != NULL) {
-                swabber(value);
-                ptlrpc_buf_set_swabbed(pill->rc_req, inout, offset);
-        }
         if (value == NULL) {
                 DEBUG_REQ(D_ERROR, pill->rc_req,
                           "Wrong buffer for field `%s' (%d of %d) "
                           "in format `%s': %d vs. %d (%s)\n",
-                          field->rmf_name, offset, lustre_msg_bufcount(msg), fmt->rf_name,
-                          lustre_msg_buflen(msg, offset), len,
+                          field->rmf_name, offset, lustre_msg_bufcount(msg),
+                          fmt->rf_name, lustre_msg_buflen(msg, offset), len,
                           rcl_names[loc]);
+        } else {
+                swabber_dumper_helper(pill, field, loc, offset, value, len,
+                                      dump, swabber);
         }
 
         return value;
 }
 
+/**
+ * Dump a request and/or reply
+ */
+void __req_capsule_dump(struct req_capsule *pill, enum req_location loc)
+{
+        const struct    req_format *fmt;
+        const struct    req_msg_field *field;
+        int             len;
+        int             i;
+
+        fmt = pill->rc_fmt;
+
+        DEBUG_REQ(D_RPCTRACE, pill->rc_req, "BEGIN REQ CAPSULE DUMP\n");
+        for (i = 0; i < fmt->rf_fields[loc].nr; ++i) {
+                field = FMT_FIELD(fmt, loc, i);
+                if (field->rmf_dumper == NULL) {
+                        /*
+                         * FIXME Add a default hex dumper for fields that don't
+                         * have a specific dumper
+                         */
+                        len = req_capsule_get_size(pill, field, loc);
+                        CDEBUG(D_RPCTRACE, "Field %s has no dumper function;"
+                               "field size is %d\n", field->rmf_name, len);
+                } else {
+                        /* It's the dumping side-effect that we're interested in */
+                        (void) __req_capsule_get(pill, field, loc, NULL, 1);
+                }
+        }
+        CDEBUG(D_RPCTRACE, "END REQ CAPSULE DUMP\n");
+}
+
+/**
+ * Dump a request.
+ */
+void req_capsule_client_dump(struct req_capsule *pill)
+{
+        __req_capsule_dump(pill, RCL_CLIENT);
+}
+EXPORT_SYMBOL(req_capsule_client_dump);
+
+/**
+ * Dump a reply
+ */
+void req_capsule_server_dump(struct req_capsule *pill)
+{
+        __req_capsule_dump(pill, RCL_SERVER);
+}
+EXPORT_SYMBOL(req_capsule_server_dump);
+
+/**
+ * Trivial wrapper around __req_capsule_get(), that returns the PTLRPC request
+ * buffer corresponding to the given RMF (\a field) of a \a pill.
+ */
 void *req_capsule_client_get(struct req_capsule *pill,
                              const struct req_msg_field *field)
 {
-        return __req_capsule_get(pill, field, RCL_CLIENT, NULL);
+        return __req_capsule_get(pill, field, RCL_CLIENT, NULL, 0);
 }
 EXPORT_SYMBOL(req_capsule_client_get);
 
+/**
+ * Same as req_capsule_client_get(), but with a \a swabber argument.
+ *
+ * Currently unused; will be removed when req_capsule_server_swab_get() is
+ * unused too.
+ */
 void *req_capsule_client_swab_get(struct req_capsule *pill,
                                   const struct req_msg_field *field,
                                   void (*swabber)(void* ))
 {
-        return __req_capsule_get(pill, field, RCL_CLIENT, swabber);
+        return __req_capsule_get(pill, field, RCL_CLIENT, swabber, 0);
 }
 EXPORT_SYMBOL(req_capsule_client_swab_get);
 
+/**
+ * Utility that combines req_capsule_set_size() and req_capsule_client_get().
+ *
+ * First the \a pill's request \a field's size is set (\a rc_area) using
+ * req_capsule_set_size() with the given \a len.  Then the actual buffer is
+ * returned.
+ */
 void *req_capsule_client_sized_get(struct req_capsule *pill,
                                    const struct req_msg_field *field,
                                    int len)
 {
         req_capsule_set_size(pill, field, RCL_CLIENT, len);
-        return __req_capsule_get(pill, field, RCL_CLIENT, NULL);
+        return __req_capsule_get(pill, field, RCL_CLIENT, NULL, 0);
 }
 EXPORT_SYMBOL(req_capsule_client_sized_get);
 
+/**
+ * Trivial wrapper around __req_capsule_get(), that returns the PTLRPC reply
+ * buffer corresponding to the given RMF (\a field) of a \a pill.
+ */
 void *req_capsule_server_get(struct req_capsule *pill,
                              const struct req_msg_field *field)
 {
-        return __req_capsule_get(pill, field, RCL_SERVER, NULL);
+        return __req_capsule_get(pill, field, RCL_SERVER, NULL, 0);
 }
 EXPORT_SYMBOL(req_capsule_server_get);
 
+/**
+ * Same as req_capsule_server_get(), but with a \a swabber argument.
+ *
+ * Ideally all swabbing should be done pursuant to RMF definitions, with no
+ * swabbing done outside this capsule abstraction.
+ */
 void *req_capsule_server_swab_get(struct req_capsule *pill,
                                   const struct req_msg_field *field,
                                   void *swabber)
 {
-        return __req_capsule_get(pill, field, RCL_SERVER, swabber);
+        return __req_capsule_get(pill, field, RCL_SERVER, swabber, 0);
 }
 EXPORT_SYMBOL(req_capsule_server_swab_get);
 
-
+/**
+ * Utility that combines req_capsule_set_size() and req_capsule_server_get().
+ *
+ * First the \a pill's request \a field's size is set (\a rc_area) using
+ * req_capsule_set_size() with the given \a len.  Then the actual buffer is
+ * returned.
+ */
 void *req_capsule_server_sized_get(struct req_capsule *pill,
                                    const struct req_msg_field *field,
                                    int len)
 {
         req_capsule_set_size(pill, field, RCL_SERVER, len);
-        return __req_capsule_get(pill, field, RCL_SERVER, NULL);
+        return __req_capsule_get(pill, field, RCL_SERVER, NULL, 0);
 }
 EXPORT_SYMBOL(req_capsule_server_sized_get);
 
+/**
+ * Returns the buffer of a \a pill corresponding to the given \a field from the
+ * request (if the caller is executing on the server-side) or reply (if the
+ * caller is executing on the client-side).
+ *
+ * This function convienient for use is code that could be executed on the
+ * client and server alike.
+ */
 const void *req_capsule_other_get(struct req_capsule *pill,
                                   const struct req_msg_field *field)
 {
-        return __req_capsule_get(pill, field, pill->rc_loc ^ 1, NULL);
+        return __req_capsule_get(pill, field, pill->rc_loc ^ 1, NULL, 0);
 }
 EXPORT_SYMBOL(req_capsule_other_get);
 
+/**
+ * Set the size of the PTLRPC request/reply (\a loc) buffer for the given \a
+ * field of the given \a pill.
+ *
+ * This function must be used when constructing variable sized fields of a
+ * request or reply.
+ */
 void req_capsule_set_size(struct req_capsule *pill,
                           const struct req_msg_field *field,
                           enum req_location loc, int size)
@@ -1527,16 +1820,29 @@ void req_capsule_set_size(struct req_capsule *pill,
             (field->rmf_size != -1) &&
             !(field->rmf_flags & RMF_F_NO_SIZE_CHECK) &&
             (size > 0)) {
-                CERROR("%s: field size mismatch %d != %d (%d)\n",
-                       field->rmf_name, size, field->rmf_size, loc);
-                LBUG();
+                if ((field->rmf_flags & RMF_F_STRUCT_ARRAY) &&
+                    (size % field->rmf_size != 0)) {
+                        CERROR("%s: array field size mismatch "
+                               "%d %% %d != 0 (%d)\n",
+                               field->rmf_name, size, field->rmf_size, loc);
+                        LBUG();
+                } else if (!(field->rmf_flags & RMF_F_STRUCT_ARRAY) &&
+                    size < field->rmf_size) {
+                        CERROR("%s: field size mismatch %d != %d (%d)\n",
+                               field->rmf_name, size, field->rmf_size, loc);
+                        LBUG();
+                }
         }
 
         pill->rc_area[loc][__req_capsule_offset(pill, field, loc)] = size;
 }
 EXPORT_SYMBOL(req_capsule_set_size);
 
-/* NB: this function doesn't correspond with req_capsule_set_size(), which
+/**
+ * Return the actual PTLRPC buffer length of a request or reply (\a loc)
+ * for the given \a pill's given \a field.
+ *
+ * NB: this function doesn't correspond with req_capsule_set_size(), which
  * actually sets the size in pill.rc_area[loc][offset], but this function
  * returns the message buflen[offset], maybe we should use another name.
  */
@@ -1551,6 +1857,13 @@ int req_capsule_get_size(const struct req_capsule *pill,
 }
 EXPORT_SYMBOL(req_capsule_get_size);
 
+/**
+ * Wrapper around lustre_msg_size() that returns the PTLRPC size needed for the
+ * given \a pill's request or reply (\a loc) given the field size recorded in
+ * the \a pill's rc_area.
+ *
+ * See also req_capsule_set_size().
+ */
 int req_capsule_msg_size(struct req_capsule *pill, enum req_location loc)
 {
         return lustre_msg_size(pill->rc_req->rq_import->imp_msg_magic,
@@ -1558,11 +1871,26 @@ int req_capsule_msg_size(struct req_capsule *pill, enum req_location loc)
                                pill->rc_area[loc]);
 }
 
+/**
+ * While req_capsule_msg_size() computes the size of a PTLRPC request or reply
+ * (\a loc) given a \a pill's \a rc_area, this function computes the size of a
+ * PTLRPC request or reply given only an RQF (\a fmt).
+ *
+ * This function should not be used for formats which contain variable size
+ * fields.
+ */
 int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
                          enum req_location loc)
 {
         int size, i = 0;
 
+        /*
+         * This function should probably LASSERT() that fmt has no fields with
+         * RMF_F_STRUCT_ARRAY in rmf_flags, since we can't know here how many
+         * elements in the array there will ultimately be, but then, we could
+         * assume that there will be at least one element, and that's just what
+         * we do.
+         */
         size = lustre_msg_hdr_size(magic, fmt->rf_fields[loc].nr);
         if (size < 0)
                 return size;
@@ -1573,8 +1901,25 @@ int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
         return size;
 }
 
-#define FMT_FIELD(fmt, i, j) (fmt)->rf_fields[(i)].d[(j)]
-
+/**
+ * Changes the format of an RPC.
+ *
+ * The pill must already have been initialized, which means that it already has
+ * a request format.  The new format \a fmt must be an extension of the pill's
+ * old format.  Specifically: the new format must have as many request and reply
+ * fields as the old one, and all fields shared by the old and new format must
+ * be at least as large in the new format.
+ *
+ * The new format's fields may be of different "type" than the old format, but
+ * only for fields that are "opaque" blobs: fields which have a) have no
+ * \a rmf_swabber, b) \a rmf_flags == 0 or RMF_F_NO_SIZE_CHECK, and c) \a
+ * rmf_size == -1 or \a rmf_flags == RMF_F_NO_SIZE_CHECK.  For example,
+ * OBD_SET_INFO has a key field and an opaque value field that gets interpreted
+ * according to the key field.  When the value, according to the key, contains a
+ * structure (or array thereof) to be swabbed, the format should be changed to
+ * one where the value field has \a rmf_size/rmf_flags/rmf_swabber set
+ * accordingly.
+ */
 void req_capsule_extend(struct req_capsule *pill, const struct req_format *fmt)
 {
         int i;
@@ -1592,6 +1937,14 @@ void req_capsule_extend(struct req_capsule *pill, const struct req_format *fmt)
         for (i = 0; i < RCL_NR; ++i) {
                 LASSERT(fmt->rf_fields[i].nr >= old->rf_fields[i].nr);
                 for (j = 0; j < old->rf_fields[i].nr - 1; ++j) {
+                        const struct req_msg_field *ofield = FMT_FIELD(old, i, j);
+
+                        /* "opaque" fields can be transmogrified */
+                        if (ofield->rmf_swabber == NULL &&
+                            (ofield->rmf_flags & ~RMF_F_NO_SIZE_CHECK) == 0 &&
+                            (ofield->rmf_size == -1 ||
+                            ofield->rmf_flags == RMF_F_NO_SIZE_CHECK))
+                                continue;
                         LASSERT(FMT_FIELD(fmt, i, j) == FMT_FIELD(old, i, j));
                 }
                 /*
@@ -1605,6 +1958,11 @@ void req_capsule_extend(struct req_capsule *pill, const struct req_format *fmt)
 }
 EXPORT_SYMBOL(req_capsule_extend);
 
+/**
+ * This function returns a non-zero value if the given \a field is present in
+ * the format (\a rc_fmt) of \a pill's PTLRPC request or reply (\a loc), else it
+ * returns 0.
+ */
 int req_capsule_has_field(const struct req_capsule *pill,
                           const struct req_msg_field *field,
                           enum req_location loc)
@@ -1615,6 +1973,10 @@ int req_capsule_has_field(const struct req_capsule *pill,
 }
 EXPORT_SYMBOL(req_capsule_has_field);
 
+/**
+ * Returns a non-zero value if the given \a field is present in the given \a
+ * pill's PTLRPC request or reply (\a loc), else it returns 0.
+ */
 int req_capsule_field_present(const struct req_capsule *pill,
                               const struct req_msg_field *field,
                               enum req_location loc)
@@ -1629,6 +1991,12 @@ int req_capsule_field_present(const struct req_capsule *pill,
 }
 EXPORT_SYMBOL(req_capsule_field_present);
 
+/**
+ * This function shrinks the size of the _buffer_ of the \a pill's PTLRPC
+ * request or reply (\a loc).
+ *
+ * This is not the opposite of req_capsule_extend().
+ */
 void req_capsule_shrink(struct req_capsule *pill,
                         const struct req_msg_field *field,
                         unsigned int newlen,
index 82999a3..ae5658b 100644 (file)
@@ -773,26 +773,6 @@ static inline void *__lustre_swab_buf(struct lustre_msg *msg, int index,
         return ptr;
 }
 
-void *lustre_swab_reqbuf(struct ptlrpc_request *req, int index, int min_size,
-                         void *swabber)
-{
-        if (!ptlrpc_buf_need_swab(req, 1, index))
-                return lustre_msg_buf(req->rq_reqmsg, index, min_size);
-
-        lustre_set_req_swabbed(req, index);
-        return __lustre_swab_buf(req->rq_reqmsg, index, min_size, swabber);
-}
-
-void *lustre_swab_repbuf(struct ptlrpc_request *req, int index,
-                         int min_size, void *swabber)
-{
-        if (!ptlrpc_buf_need_swab(req, 0, index))
-                return lustre_msg_buf(req->rq_repmsg, index, min_size);
-
-        lustre_set_rep_swabbed(req, index);
-        return __lustre_swab_buf(req->rq_repmsg, index, min_size, swabber);
-}
-
 static inline struct ptlrpc_body *lustre_msg_ptlrpc_body(struct lustre_msg *msg)
 {
         return lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF,
@@ -1749,26 +1729,6 @@ void lustre_swab_mdt_remote_perm (struct mdt_remote_perm *p)
         __swab32s (&p->rp_access_perm);
 };
 
-void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa)
-{
-        __swab32s (&sa->sa_opcode);
-        __swab32s (&sa->sa_fsuid);
-        __swab32s (&sa->sa_fsgid);
-        __swab32s (&sa->sa_cap);
-        __swab32s (&sa->sa_suppgid);
-        __swab32s (&sa->sa_mode);
-        lustre_swab_ll_fid (&sa->sa_fid);
-        __swab64s (&sa->sa_valid);
-        __swab64s (&sa->sa_size);
-        __swab64s (&sa->sa_mtime);
-        __swab64s (&sa->sa_atime);
-        __swab64s (&sa->sa_ctime);
-        __swab32s (&sa->sa_uid);
-        __swab32s (&sa->sa_gid);
-        __swab32s (&sa->sa_attr_flags);
-        CLASSERT(offsetof(typeof(*sa), sa_padding) != 0);
-}
-
 void lustre_swab_fid2path(struct getinfo_fid2path *gf)
 {
         lustre_swab_lu_fid(&gf->gf_fid);
@@ -1778,72 +1738,6 @@ void lustre_swab_fid2path(struct getinfo_fid2path *gf)
 }
 EXPORT_SYMBOL(lustre_swab_fid2path);
 
-void lustre_swab_mds_rec_join (struct mds_rec_join *jr)
-{
-        __swab64s(&jr->jr_headsize);
-        lustre_swab_ll_fid(&jr->jr_fid);
-}
-
-void lustre_swab_mdt_rec_join (struct mdt_rec_join *jr)
-{
-        __swab64s(&jr->jr_headsize);
-        lustre_swab_lu_fid(&jr->jr_fid);
-}
-
-void lustre_swab_mds_rec_create (struct mds_rec_create *cr)
-{
-        __swab32s (&cr->cr_opcode);
-        __swab32s (&cr->cr_fsuid);
-        __swab32s (&cr->cr_fsgid);
-        __swab32s (&cr->cr_cap);
-        __swab32s (&cr->cr_flags); /* for use with open */
-        __swab32s (&cr->cr_mode);
-        lustre_swab_ll_fid (&cr->cr_fid);
-        lustre_swab_ll_fid (&cr->cr_replayfid);
-        __swab64s (&cr->cr_time);
-        __swab64s (&cr->cr_rdev);
-        __swab32s (&cr->cr_suppgid);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_4) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_5) != 0);
-}
-
-void lustre_swab_mds_rec_link (struct mds_rec_link *lk)
-{
-        __swab32s (&lk->lk_opcode);
-        __swab32s (&lk->lk_fsuid);
-        __swab32s (&lk->lk_fsgid);
-        __swab32s (&lk->lk_cap);
-        __swab32s (&lk->lk_suppgid1);
-        __swab32s (&lk->lk_suppgid2);
-        lustre_swab_ll_fid (&lk->lk_fid1);
-        lustre_swab_ll_fid (&lk->lk_fid2);
-        __swab64s (&lk->lk_time);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_4) != 0);
-}
-
-void lustre_swab_mds_rec_unlink (struct mds_rec_unlink *ul)
-{
-        __swab32s (&ul->ul_opcode);
-        __swab32s (&ul->ul_fsuid);
-        __swab32s (&ul->ul_fsgid);
-        __swab32s (&ul->ul_cap);
-        __swab32s (&ul->ul_suppgid);
-        __swab32s (&ul->ul_mode);
-        lustre_swab_ll_fid (&ul->ul_fid1);
-        lustre_swab_ll_fid (&ul->ul_fid2);
-        __swab64s (&ul->ul_time);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_4) != 0);
-}
-
 void lustre_swab_fiemap_extent(struct ll_fiemap_extent *fm_extent)
 {
         __swab64s(&fm_extent->fe_logical);
@@ -1868,23 +1762,6 @@ void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
                 lustre_swab_fiemap_extent(&fiemap->fm_extents[i]);
 }
 
-void lustre_swab_mds_rec_rename (struct mds_rec_rename *rn)
-{
-        __swab32s (&rn->rn_opcode);
-        __swab32s (&rn->rn_fsuid);
-        __swab32s (&rn->rn_fsgid);
-        __swab32s (&rn->rn_cap);
-        __swab32s (&rn->rn_suppgid1);
-        __swab32s (&rn->rn_suppgid2);
-        lustre_swab_ll_fid (&rn->rn_fid1);
-        lustre_swab_ll_fid (&rn->rn_fid2);
-        __swab64s (&rn->rn_time);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_4) != 0);
-}
-
 void lustre_swab_mdt_rec_reint (struct mdt_rec_reint *rr)
 {
         __swab32s (&rr->rr_opcode);
@@ -1975,18 +1852,6 @@ static void lustre_swab_lov_user_md_common(struct lov_user_md_v1 *lum)
         EXIT;
 }
 
-static void print_lumj (struct lov_user_md_join *lumj)
-{
-        CDEBUG(D_OTHER, "lov_user_md %p:\n", lumj);
-        CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lumj->lmm_magic);
-        CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lumj->lmm_pattern);
-        CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lumj->lmm_object_id);
-        CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lumj->lmm_object_gr);
-        CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lumj->lmm_stripe_size);
-        CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lumj->lmm_stripe_count);
-        CDEBUG(D_OTHER, "\tlmm_extent_count: %#x\n", lumj->lmm_extent_count);
-}
-
 void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum)
 {
         ENTRY;
@@ -2017,21 +1882,6 @@ void lustre_swab_lov_mds_md(struct lov_mds_md *lmm)
         EXIT;
 }
 
-void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj)
-{
-        ENTRY;
-        CDEBUG(D_IOCTL, "swabbing lov_user_md_join\n");
-        __swab32s(&lumj->lmm_magic);
-        __swab32s(&lumj->lmm_pattern);
-        __swab64s(&lumj->lmm_object_id);
-        __swab64s(&lumj->lmm_object_gr);
-        __swab32s(&lumj->lmm_stripe_size);
-        __swab32s(&lumj->lmm_stripe_count);
-        __swab32s(&lumj->lmm_extent_count);
-        print_lumj(lumj);
-        EXIT;
-}
-
 void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,
                                      int stripe_count)
 {
@@ -2123,14 +1973,94 @@ void lustre_swab_qdata(struct qunit_data *d)
         __swab64s (&d->padding);
 }
 
+/* Dump functions */
+void dump_ioo(struct obd_ioobj *ioo)
+{
+        CDEBUG(D_RPCTRACE,
+               "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);
+}
+
+void dump_rniobuf(struct niobuf_remote *nb)
+{
+        CDEBUG(D_RPCTRACE, "niobuf_remote: offset="LPU64", len=%d, flags=%x\n",
+               nb->offset, nb->len, nb->flags);
+}
+
+void dump_obdo(struct obdo *oa)
+{
+        __u32 valid = oa->o_valid;
+
+        CDEBUG(D_RPCTRACE, "obdo: o_valid = %08x\n", valid);
+        if (valid & OBD_MD_FLID)
+                CDEBUG(D_RPCTRACE, "obdo: o_id = "LPD64"\n", oa->o_id);
+        if (valid & OBD_MD_FLGROUP)
+                CDEBUG(D_RPCTRACE, "obdo: o_gr = "LPD64"\n", oa->o_gr);
+        if (valid & OBD_MD_FLFID)
+                CDEBUG(D_RPCTRACE, "obdo: o_fid = "LPD64"\n", oa->o_fid);
+        if (valid & OBD_MD_FLSIZE)
+                CDEBUG(D_RPCTRACE, "obdo: o_size = "LPD64"\n", oa->o_size);
+        if (valid & OBD_MD_FLMTIME)
+                CDEBUG(D_RPCTRACE, "obdo: o_mtime = "LPD64"\n", oa->o_mtime);
+        if (valid & OBD_MD_FLATIME)
+                CDEBUG(D_RPCTRACE, "obdo: o_atime = "LPD64"\n", oa->o_atime);
+        if (valid & OBD_MD_FLCTIME)
+                CDEBUG(D_RPCTRACE, "obdo: o_ctime = "LPD64"\n", oa->o_ctime);
+        if (valid & OBD_MD_FLBLOCKS)   /* allocation of space */
+                CDEBUG(D_RPCTRACE, "obdo: o_blocks = "LPD64"\n", oa->o_blocks);
+        if (valid & OBD_MD_FLGRANT)
+                CDEBUG(D_RPCTRACE, "obdo: o_grant = "LPD64"\n", oa->o_grant);
+        if (valid & OBD_MD_FLBLKSZ)
+                CDEBUG(D_RPCTRACE, "obdo: o_blksize = %d\n", oa->o_blksize);
+        if (valid & (OBD_MD_FLTYPE | OBD_MD_FLMODE))
+                CDEBUG(D_RPCTRACE, "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)
+                CDEBUG(D_RPCTRACE, "obdo: o_uid = %u\n", oa->o_uid);
+        if (valid & OBD_MD_FLGID)
+                CDEBUG(D_RPCTRACE, "obdo: o_gid = %u\n", oa->o_gid);
+        if (valid & OBD_MD_FLFLAGS)
+                CDEBUG(D_RPCTRACE, "obdo: o_flags = %x\n", oa->o_flags);
+        if (valid & OBD_MD_FLNLINK)
+                CDEBUG(D_RPCTRACE, "obdo: o_nlink = %u\n", oa->o_nlink);
+        else if (valid & OBD_MD_FLCKSUM)
+                CDEBUG(D_RPCTRACE, "obdo: o_checksum (o_nlink) = %u\n", oa->o_nlink);
+        if (valid & OBD_MD_FLGENER)
+                CDEBUG(D_RPCTRACE, "obdo: o_generation = %u\n",
+                       oa->o_generation);
+        if (valid & OBD_MD_FLEASIZE)
+                CDEBUG(D_RPCTRACE, "obdo: o_easize = %u\n", oa->o_easize);
+        else if (valid & OBD_MD_FLEPOCH)
+                CDEBUG(D_RPCTRACE, "obdo: o_epoc (o_easize) = %u\n", oa->o_easize);
+        if (valid & OBD_MD_FLID)
+                CDEBUG(D_RPCTRACE, "obdo: o_stripe_idx = %u\n", oa->o_stripe_idx);
+        if (valid & OBD_MD_FLHANDLE)
+                CDEBUG(D_RPCTRACE, "obdo: o_handle = "LPD64"\n", oa->o_handle.cookie);
+        if (valid & OBD_MD_FLCOOKIE)
+                CDEBUG(D_RPCTRACE, "obdo: o_lcookie = "
+                       "(llog_cookie dumping not yet implemented)\n");
+}
+
+void dump_ost_body(struct ost_body *ob)
+{
+        dump_obdo(&ob->oa);
+}
+
+void dump_rcs(__u32 *rc)
+{
+        CDEBUG(D_RPCTRACE, "rmf_rcs: %d\n", *rc);
+}
+
 #ifdef __KERNEL__
 
 /**
  * got qdata from request(req/rep)
  */
-struct qunit_data *quota_get_qdata(void *request, int is_req, int is_exp)
+struct qunit_data *quota_get_qdata(void *r, int is_req, int is_exp)
 {
-        struct ptlrpc_request *req = (struct ptlrpc_request *)request;
+        struct ptlrpc_request *req = (struct ptlrpc_request *)r;
         struct qunit_data *qdata;
         __u64  flags = is_exp ? req->rq_export->exp_connect_flags :
                        req->rq_import->imp_connect_data.ocd_connect_flags;
@@ -2142,13 +2072,9 @@ struct qunit_data *quota_get_qdata(void *request, int is_req, int is_exp)
         LASSERT(flags & OBD_CONNECT_CHANGE_QS);
 
         if (is_req == QUOTA_REQUEST)
-                qdata = lustre_swab_reqbuf(req, REQ_REC_OFF,
-                                           sizeof(struct qunit_data),
-                                           lustre_swab_qdata);
+                qdata = req_capsule_client_get(&req->rq_pill, &RMF_QUNIT_DATA);
         else
-                qdata = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                           sizeof(struct qunit_data),
-                                           lustre_swab_qdata);
+                qdata = req_capsule_server_get(&req->rq_pill, &RMF_QUNIT_DATA);
         if (qdata == NULL)
                 return ERR_PTR(-EPROTO);
 
@@ -2160,10 +2086,10 @@ EXPORT_SYMBOL(quota_get_qdata);
 /**
  * copy qdata to request(req/rep)
  */
-int quota_copy_qdata(void *request, struct qunit_data *qdata,
-                     int is_req, int is_exp)
+int quota_copy_qdata(void *r, struct qunit_data *qdata, int is_req,
+                     int is_exp)
 {
-        struct ptlrpc_request *req = (struct ptlrpc_request *)request;
+        struct ptlrpc_request *req = (struct ptlrpc_request *)r;
         void *target;
         __u64  flags = is_exp ? req->rq_export->exp_connect_flags :
                 req->rq_import->imp_connect_data.ocd_connect_flags;
@@ -2176,14 +2102,13 @@ int quota_copy_qdata(void *request, struct qunit_data *qdata,
         LASSERT(flags & OBD_CONNECT_CHANGE_QS);
 
         if (is_req == QUOTA_REQUEST)
-                target = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                        sizeof(struct qunit_data));
+                target = req_capsule_client_get(&req->rq_pill, &RMF_QUNIT_DATA);
         else
-                target = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                        sizeof(struct qunit_data));
+                target = req_capsule_server_get(&req->rq_pill, &RMF_QUNIT_DATA);
         if (target == NULL)
                 return -EPROTO;
 
+        LASSERT(target != qdata);
         memcpy(target, qdata, sizeof(*qdata));
         return 0;
 }
index 0485496..f36e3e1 100644 (file)
@@ -50,7 +50,7 @@
 
 struct semaphore pinger_sem;
 static CFS_LIST_HEAD(pinger_imports);
-static struct list_head timeout_list = CFS_LIST_HEAD_INIT(timeout_list); 
+static struct list_head timeout_list = CFS_LIST_HEAD_INIT(timeout_list);
 struct ptlrpc_request *
 ptlrpc_prep_ping(struct obd_import *imp)
 {
@@ -146,17 +146,17 @@ cfs_duration_t pinger_check_timeout(cfs_time_t time)
         struct timeout_item *item;
         cfs_time_t timeout = PING_INTERVAL;
 
-       /* The timeout list is a increase order sorted list */
+        /* The timeout list is a increase order sorted list */
         mutex_down(&pinger_sem);
         list_for_each_entry(item, &timeout_list, ti_chain) {
-               int ti_timeout = item->ti_timeout;
-               if (timeout > ti_timeout)
-                        timeout = ti_timeout;
-               break;
-       }
+                int ti_timeout = item->ti_timeout;
+                if (timeout > ti_timeout)
+                        timeout = ti_timeout;
+                break;
+        }
         mutex_up(&pinger_sem);
-        
-       return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),
+
+        return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),
                                          cfs_time_current());
 }
 
@@ -454,7 +454,7 @@ struct timeout_item* ptlrpc_new_timeout(int time, enum timeout_event event,
                                         timeout_cb_t cb, void *data)
 {
         struct timeout_item *ti;
-        
+
         OBD_ALLOC_PTR(ti);
         if (!ti)
                 return(NULL);
@@ -465,7 +465,7 @@ struct timeout_item* ptlrpc_new_timeout(int time, enum timeout_event event,
         ti->ti_event = event;
         ti->ti_cb = cb;
         ti->ti_cb_data = data;
-        
+
         return ti;
 }
 
@@ -499,7 +499,7 @@ out:
         return item;
 }
 
-/* Add a client_obd to the timeout event list, when timeout(@time) 
+/* Add a client_obd to the timeout event list, when timeout(@time)
  * happens, the callback(@cb) will be called.
  */
 int ptlrpc_add_timeout_client(int time, enum timeout_event event,
@@ -517,15 +517,15 @@ int ptlrpc_add_timeout_client(int time, enum timeout_event event,
         list_add(obd_list, &ti->ti_obd_list);
         mutex_up(&pinger_sem);
         return 0;
-}           
+}
 
-int ptlrpc_del_timeout_client(struct list_head *obd_list, 
+int ptlrpc_del_timeout_client(struct list_head *obd_list,
                               enum timeout_event event)
 {
         struct timeout_item *ti = NULL, *item;
 
         if (list_empty(obd_list))
-                return 0;  
+                return 0;
         mutex_down(&pinger_sem);
         list_del_init(obd_list);
         /**
@@ -545,7 +545,7 @@ int ptlrpc_del_timeout_client(struct list_head *obd_list,
         }
         mutex_up(&pinger_sem);
         return 0;
-}  
+}
 
 int ptlrpc_pinger_remove_timeouts(void)
 {
@@ -911,13 +911,13 @@ int ptlrpc_add_timeout_client(int time, enum timeout_event event,
                               struct list_head *obd_list)
 {
         return 0;
-}           
+}
 
 int ptlrpc_del_timeout_client(struct list_head *obd_list,
                               enum timeout_event event)
 {
         return 0;
-}  
+}
 
 int ptlrpc_pinger_add_import(struct obd_import *imp)
 {
index 50fec42..99dba0d 100644 (file)
@@ -238,8 +238,6 @@ EXPORT_SYMBOL(lustre_msg_string);
 EXPORT_SYMBOL(ptlrpc_buf_set_swabbed);
 EXPORT_SYMBOL(ptlrpc_buf_need_swab);
 EXPORT_SYMBOL(lustre_swab_ptlrpc_body);
-EXPORT_SYMBOL(lustre_swab_reqbuf);
-EXPORT_SYMBOL(lustre_swab_repbuf);
 EXPORT_SYMBOL(lustre_swab_obdo);
 EXPORT_SYMBOL(lustre_swab_obd_statfs);
 EXPORT_SYMBOL(lustre_swab_obd_ioobj);
@@ -254,19 +252,11 @@ EXPORT_SYMBOL(lustre_swab_mdt_epoch);
 EXPORT_SYMBOL(lustre_swab_obd_quotactl);
 EXPORT_SYMBOL(lustre_swab_mds_remote_perm);
 EXPORT_SYMBOL(lustre_swab_mdt_remote_perm);
-EXPORT_SYMBOL(lustre_swab_mds_rec_setattr);
-EXPORT_SYMBOL(lustre_swab_mds_rec_create);
-EXPORT_SYMBOL(lustre_swab_mds_rec_join);
-EXPORT_SYMBOL(lustre_swab_mdt_rec_join);
-EXPORT_SYMBOL(lustre_swab_mds_rec_link);
-EXPORT_SYMBOL(lustre_swab_mds_rec_unlink);
-EXPORT_SYMBOL(lustre_swab_mds_rec_rename);
 EXPORT_SYMBOL(lustre_swab_mdt_rec_reint);
 EXPORT_SYMBOL(lustre_swab_lov_desc);
 EXPORT_SYMBOL(lustre_swab_lov_user_md_v1);
 EXPORT_SYMBOL(lustre_swab_lov_user_md_v3);
 EXPORT_SYMBOL(lustre_swab_lov_user_md_objects);
-EXPORT_SYMBOL(lustre_swab_lov_user_md_join);
 EXPORT_SYMBOL(lustre_swab_lov_mds_md);
 EXPORT_SYMBOL(lustre_swab_ldlm_res_id);
 EXPORT_SYMBOL(lustre_swab_ldlm_policy_data);
@@ -275,6 +265,11 @@ EXPORT_SYMBOL(lustre_swab_ldlm_resource_desc);
 EXPORT_SYMBOL(lustre_swab_ldlm_lock_desc);
 EXPORT_SYMBOL(lustre_swab_ldlm_request);
 EXPORT_SYMBOL(lustre_swab_ldlm_reply);
+EXPORT_SYMBOL(dump_ioo);
+EXPORT_SYMBOL(dump_rniobuf);
+EXPORT_SYMBOL(dump_obdo);
+EXPORT_SYMBOL(dump_ost_body);
+EXPORT_SYMBOL(dump_rcs);
 EXPORT_SYMBOL(lustre_swab_qdata);
 EXPORT_SYMBOL(lustre_swab_quota_adjust_qunit);
 EXPORT_SYMBOL(lustre_msg_get_flags);
index 94d4429..f9d1b73 100644 (file)
@@ -774,8 +774,8 @@ static void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
                         exp->exp_obd->obd_eviction_timer =
                                 cfs_time_current_sec() + 3 * PING_INTERVAL;
                         CDEBUG(D_HA, "%s: Think about evicting %s from "CFS_TIME_T"\n",
-                               exp->exp_obd->obd_name, obd_export_nid2str(exp),
-                               oldest_time);
+                               exp->exp_obd->obd_name, 
+                               obd_export_nid2str(oldest_exp), oldest_time);
                 }
         } else {
                 if (cfs_time_current_sec() >
@@ -1947,7 +1947,7 @@ static int ptlrpc_main(void *arg)
 
         /* XXX maintain a list of all managed devices: insert here */
 
-        while ((thread->t_flags & SVC_STOPPING) == 0) {
+        while (!(thread->t_flags & SVC_STOPPING) && !svc->srv_is_stopping) {
                 /* Don't exit while there are replies to be handled */
                 struct l_wait_info lwi = LWI_TIMEOUT(svc->srv_rqbd_timeout,
                                                      ptlrpc_retry_rqbds, svc);
@@ -1957,7 +1957,8 @@ static int ptlrpc_main(void *arg)
                 cond_resched();
 
                 l_wait_event_exclusive (svc->srv_waitq,
-                              ((thread->t_flags & SVC_STOPPING) != 0) ||
+                              thread->t_flags & SVC_STOPPING ||
+                              svc->srv_is_stopping ||
                               (!list_empty(&svc->srv_idle_rqbds) &&
                                svc->srv_rqbd_timeout == 0) ||
                               !list_empty(&svc->srv_req_in_queue) ||
@@ -1967,15 +1968,17 @@ static int ptlrpc_main(void *arg)
                               svc->srv_at_check,
                               &lwi);
 
+                if (thread->t_flags & SVC_STOPPING || svc->srv_is_stopping)
+                        break;
+
                 lc_watchdog_touch(thread->t_watchdog, GET_TIMEOUT(svc));
 
                 ptlrpc_check_rqbd_pool(svc);
 
-                if ((svc->srv_threads_started < svc->srv_threads_max) &&
-                    (svc->srv_n_active_reqs >= (svc->srv_threads_started - 1))){
+                if (svc->srv_threads_started < svc->srv_threads_max &&
+                    svc->srv_n_active_reqs >= (svc->srv_threads_started - 1)) 
                         /* Ignore return code - we tried... */
                         ptlrpc_start_thread(dev, svc);
-                }
 
                 if (!list_empty(&svc->srv_req_in_queue)) {
                         /* Process all incoming reqs before handling any */
@@ -2176,24 +2179,19 @@ static void ptlrpc_stop_thread(struct ptlrpc_service *svc,
                                struct ptlrpc_thread *thread)
 {
         struct l_wait_info lwi = { 0 };
-        int stopped = 0;
         ENTRY;
 
+        CDEBUG(D_RPCTRACE, "Stopping thread [ %p : %u ]\n",
+               thread, thread->t_pid);
+
         spin_lock(&svc->srv_lock);
-        if (unlikely(thread->t_flags & SVC_STOPPED))
-                stopped = 1;
-        else
-                /* let the thread know that we would like it to stop asap */
-                thread->t_flags |= SVC_STOPPING;
+        /* let the thread know that we would like it to stop asap */
+        thread->t_flags |= SVC_STOPPING;
         spin_unlock(&svc->srv_lock);
 
-        if (likely(!stopped)) {
-                CDEBUG(D_RPCTRACE, "Stopping thread [ %p : %u ]\n",
-                       thread, thread->t_pid);
-                cfs_waitq_broadcast(&svc->srv_waitq);
-                l_wait_event(thread->t_ctl_waitq,
-                             (thread->t_flags & SVC_STOPPED), &lwi);
-        }
+        cfs_waitq_broadcast(&svc->srv_waitq);
+        l_wait_event(thread->t_ctl_waitq,
+                     (thread->t_flags & SVC_STOPPED), &lwi);
 
         spin_lock(&svc->srv_lock);
         list_del(&thread->t_link);
@@ -2239,6 +2237,7 @@ int ptlrpc_start_threads(struct obd_device *dev, struct ptlrpc_service *svc)
                         CERROR("cannot start %s thread #%d: rc %d\n",
                                svc->srv_thread_name, i, rc);
                         ptlrpc_stop_all_threads(svc);
+                        break;
                 }
         }
         RETURN(rc);
@@ -2256,6 +2255,10 @@ int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc)
         CDEBUG(D_RPCTRACE, "%s started %d min %d max %d running %d\n",
                svc->srv_name, svc->srv_threads_started, svc->srv_threads_min,
                svc->srv_threads_max, svc->srv_threads_running);
+
+        if (unlikely(svc->srv_is_stopping))
+                RETURN(-ESRCH);
+
         if (unlikely(svc->srv_threads_started >= svc->srv_threads_max) ||
             (OBD_FAIL_CHECK(OBD_FAIL_TGT_TOOMANY_THREADS) &&
              svc->srv_threads_started == svc->srv_threads_min - 1))
index 5ced28f..46db76f 100644 (file)
@@ -65,8 +65,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux cfs21 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT 2008 i686 i686 i386
-         * with gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) */
+         * running on Linux vl1 2.6.18-prep #2 SMP Wed Jul 22 20:53:11 CDT 2009 x86_64 x86_64 x86_64 
+         * with gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) */
 
 
         /* Constants... */
@@ -715,7 +715,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
         CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
-        CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0);
         LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
                  (long long)LOV_PATTERN_RAID0);
         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
@@ -782,22 +781,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
                  (long long)LOV_PATTERN_RAID1);
 
-        /* Checks for struct lov_mds_md_join */
-        LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_join));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count));
-
         /* Checks for struct obd_statfs */
         LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
                  (long long)(int)sizeof(struct obd_statfs));
@@ -1194,265 +1177,493 @@ void lustre_assert_wire_constants(void)
         CLASSERT(MDS_INODELOCK_UPDATE == 0x000002);
         CLASSERT(MDS_INODELOCK_OPEN == 0x000004);
 
-        /* Checks for struct mds_rec_setattr */
-        LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_setattr));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
-        CLASSERT(MDS_ATTR_MODE == 0x1ULL);
-        CLASSERT(MDS_ATTR_UID == 0x2ULL);
-        CLASSERT(MDS_ATTR_GID == 0x4ULL);
-        CLASSERT(MDS_ATTR_SIZE == 0x8ULL);
-        CLASSERT(MDS_ATTR_ATIME == 0x10ULL);
-        CLASSERT(MDS_ATTR_MTIME == 0x20ULL);
-        CLASSERT(MDS_ATTR_CTIME == 0x40ULL);
-        CLASSERT(MDS_ATTR_ATIME_SET == 0x80ULL);
-        CLASSERT(MDS_ATTR_MTIME_SET == 0x100ULL);
-        CLASSERT(MDS_ATTR_FORCE == 0x200ULL);
-        CLASSERT(MDS_ATTR_ATTR_FLAG == 0x400ULL);
-        CLASSERT(MDS_ATTR_KILL_SUID == 0x800ULL);
-        CLASSERT(MDS_ATTR_KILL_SGID == 0x1000ULL);
-        CLASSERT(MDS_ATTR_CTIME_SET == 0x2000ULL);
-        CLASSERT(MDS_ATTR_FROM_OPEN == 0x4000ULL);
-        CLASSERT(MDS_ATTR_BLOCKS == 0x8000ULL);
-
-        /* Checks for struct mds_rec_create */
-        LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_create));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_time));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
-
-        /* Checks for struct mds_rec_link */
-        LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_link));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_time));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
-
-        /* Checks for struct mds_rec_unlink */
-        LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_unlink));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
-
-        /* Checks for struct mds_rec_rename */
-        LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_rename));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_time));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
-
-        /* Checks for struct mds_rec_join */
-        LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_join));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_headsize));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize));
+        /* Checks for struct mdt_rec_setattr */
+        LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_setattr));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fid) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_valid) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_valid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_uid) == 64, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_uid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_gid) == 68, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_gid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_size) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_size));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_size));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_blocks) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_blocks));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mtime) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_mtime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_atime) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_atime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_ctime) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_ctime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_attr_flags) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_attr_flags));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_2) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_3) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_4) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_5) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5));
+
+        /* Checks for struct mdt_rec_create */
+        LASSERTF((int)sizeof(struct mdt_rec_create) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_create));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_old_handle) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_old_handle));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_time) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_time));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_rdev) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_rdev));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_rdev));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_ioepoch) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_ioepoch));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_ioepoch) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_ioepoch));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_1) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_mode) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_bias) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_flags) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_flags));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_flags) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_flags));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_2) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_3) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_3) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_4) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_4) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_4));
+
+        /* Checks for struct mdt_rec_link */
+        LASSERTF((int)sizeof(struct mdt_rec_link) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_link));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_time));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_1) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_2) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_3) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_4) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_5) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_6) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_7) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_8) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_8));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_9) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_9));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_9) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_9));
+
+        /* Checks for struct mdt_rec_unlink */
+        LASSERTF((int)sizeof(struct mdt_rec_unlink) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_unlink));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_time));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_2) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_3) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_4) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_5) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_5) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_6) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_7) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_8) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_8));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_9) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_9));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_9) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_9));
+
+        /* Checks for struct mdt_rec_rename */
+        LASSERTF((int)sizeof(struct mdt_rec_rename) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_rename));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_time));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_1) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_2) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_3) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_4) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_5) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_6) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_7) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_8) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_8));
 
         /* Checks for struct lov_desc */
         LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
@@ -2185,38 +2396,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
 
-        /* Checks for struct llog_array_rec */
-        LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_array_rec));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_hdr));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_med));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_tail));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail));
-
-        /* Checks for struct mds_extent_desc */
-        LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_extent_desc));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_start));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_len));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_lmm));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm));
-
         /* Checks for struct qunit_data */
         LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n",
                  (long long)(int)sizeof(struct qunit_data));
index 568f62f..4467117 100644 (file)
@@ -60,7 +60,6 @@
 #include <obd_ost.h>
 #include <lustre_fsfilt.h>
 #include <linux/lustre_quota.h>
-#include <class_hash.h>
 #include "quota_internal.h"
 
 #ifdef HAVE_QUOTA_SUPPORT
@@ -125,8 +124,8 @@ quota_create_lqs(unsigned long long lqs_key, struct lustre_quota_ctxt *qctxt)
         if (!qctxt->lqc_valid)
                 rc = -EBUSY;
         else
-                rc = lustre_hash_add_unique(qctxt->lqc_lqs_hash,
-                                            &lqs->lqs_key, &lqs->lqs_hash);
+                rc = cfs_hash_add_unique(qctxt->lqc_lqs_hash,
+                                         &lqs->lqs_key, &lqs->lqs_hash);
         spin_unlock(&qctxt->lqc_lock);
 
         if (!rc)
@@ -150,7 +149,7 @@ struct lustre_qunit_size *quota_search_lqs(unsigned long long lqs_key,
         int rc = 0;
 
  search_lqs:
-        lqs = lustre_hash_lookup(qctxt->lqc_lqs_hash, &lqs_key);
+        lqs = cfs_hash_lookup(qctxt->lqc_lqs_hash, &lqs_key);
         if (IS_ERR(lqs))
                 GOTO(out, rc = PTR_ERR(lqs));
 
index 6155ca9..4af5414 100644 (file)
 #include <obd_class.h>
 #include <lustre_quota.h>
 #include <lustre_fsfilt.h>
-#include <class_hash.h>
 #include <lprocfs_status.h>
 #include "quota_internal.h"
 
 #ifdef HAVE_QUOTA_SUPPORT
 
-static lustre_hash_ops_t lqs_hash_ops;
+static cfs_hash_ops_t lqs_hash_ops;
 
 unsigned long default_bunit_sz = 128 * 1024 * 1024; /* 128M bytes */
 unsigned long default_btune_ratio = 50;             /* 50 percentage */
@@ -1238,10 +1237,10 @@ qctxt_init(struct obd_device *obd, dqacq_handler_t handler)
         qctxt->lqc_sync_blk = 0;
         spin_unlock(&qctxt->lqc_lock);
 
-        qctxt->lqc_lqs_hash = lustre_hash_init("LQS_HASH",
-                                               HASH_LQS_CUR_BITS,
-                                               HASH_LQS_MAX_BITS,
-                                               &lqs_hash_ops, 0);
+        qctxt->lqc_lqs_hash = cfs_hash_create("LQS_HASH",
+                                              HASH_LQS_CUR_BITS,
+                                              HASH_LQS_MAX_BITS,
+                                              &lqs_hash_ops, CFS_HASH_REHASH);
         if (!qctxt->lqc_lqs_hash) {
                 CERROR("initialize hash lqs for %s error!\n", obd->obd_name);
                 RETURN(-ENOMEM);
@@ -1316,10 +1315,10 @@ void qctxt_cleanup(struct lustre_quota_ctxt *qctxt, int force)
                                      cfs_time_seconds(1));
         }
 
-        lustre_hash_for_each_safe(qctxt->lqc_lqs_hash, hash_put_lqs, NULL);
+        cfs_hash_for_each_safe(qctxt->lqc_lqs_hash, hash_put_lqs, NULL);
         l_wait_event(qctxt->lqc_lqs_waitq, check_lqs(qctxt), &lwi);
         down_write(&obt->obt_rwsem);
-        lustre_hash_exit(qctxt->lqc_lqs_hash);
+        cfs_hash_destroy(qctxt->lqc_lqs_hash);
         qctxt->lqc_lqs_hash = NULL;
         up_write(&obt->obt_rwsem);
 
@@ -1545,7 +1544,7 @@ void build_lqs(struct obd_device *obd)
  * string hashing using djb2 hash algorithm
  */
 static unsigned
-lqs_hash(lustre_hash_t *lh, void *key, unsigned mask)
+lqs_hash(cfs_hash_t *hs, void *key, unsigned mask)
 {
         struct quota_adjust_qunit *lqs_key;
         unsigned hash;
@@ -1618,11 +1617,11 @@ lqs_exit(struct hlist_node *hnode)
         EXIT;
 }
 
-static lustre_hash_ops_t lqs_hash_ops = {
-        .lh_hash    = lqs_hash,
-        .lh_compare = lqs_compare,
-        .lh_get     = lqs_get,
-        .lh_put     = lqs_put,
-        .lh_exit    = lqs_exit
+static cfs_hash_ops_t lqs_hash_ops = {
+        .hs_hash    = lqs_hash,
+        .hs_compare = lqs_compare,
+        .hs_get     = lqs_get,
+        .hs_put     = lqs_put,
+        .hs_exit    = lqs_exit
 };
 #endif /* HAVE_QUOTA_SUPPORT */
index 3c3b16f..cc103d1 100644 (file)
@@ -396,8 +396,9 @@ int quota_is_set(struct obd_device *obd, const unsigned int id[], int flag)
         return q_set;
 }
 
-static int quota_chk_acq_common(struct obd_device *obd, const unsigned int id[],
-                                int pending[], int count, quota_acquire acquire,
+static int quota_chk_acq_common(struct obd_device *obd, struct obd_export *exp,
+                                const unsigned int id[], int pending[],
+                                int count, quota_acquire acquire,
                                 struct obd_trans_info *oti, int isblk,
                                 struct inode *inode, int frags)
 {
@@ -412,6 +413,12 @@ static int quota_chk_acq_common(struct obd_device *obd, const unsigned int id[],
         if (!quota_is_set(obd, id, isblk ? QB_SET : QI_SET))
                 RETURN(0);
 
+        if (isblk && (exp->exp_failed || exp->exp_abort_active_req))
+                /* If the client has been evicted or if it
+                 * timed out and tried to reconnect already,
+                 * abort the request immediately */
+                RETURN(-ENOTCONN);
+
         CDEBUG(D_QUOTA, "check quota for %s\n", obd->obd_name);
         pending[USRQUOTA] = pending[GRPQUOTA] = 0;
         /* Unfortunately, if quota master is too busy to handle the
@@ -468,6 +475,11 @@ static int quota_chk_acq_common(struct obd_device *obd, const unsigned int id[],
                         break;
                 }
 
+                if (isblk && (exp->exp_failed || exp->exp_abort_active_req))
+                        /* The client has been evicted or tried to
+                         * to reconnect already, abort the request */
+                        RETURN(-ENOTCONN);
+
                 /* -EBUSY and others, wait a second and try again */
                 if (rc < 0) {
                         cfs_waitq_t        waitq;
@@ -511,6 +523,8 @@ static int quota_chk_acq_common(struct obd_device *obd, const unsigned int id[],
                                     LQUOTA_WAIT_FOR_CHK_INO,
                             timediff);
 
+        if (rc > 0)
+                rc = 0;
         RETURN(rc);
 }
 
index 37739e8..790fd83 100644 (file)
@@ -255,9 +255,7 @@ int dqacq_adjust_qunit_sz(struct obd_device *obd, qid_t id, int type,
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_quota_ctxt *qctxt = &mds->mds_obt.obt_qctxt;
-        struct obd_device *lov_mds_obd = class_exp2obd(mds->mds_osc_exp);
-        struct lov_obd *lov = &lov_mds_obd->u.lov;
-        __u32 ost_num = lov->desc.ld_tgt_count, mdt_num = 1;
+        __u32 ost_num = mds->mds_lov_objid_count, mdt_num = 1;
         struct quota_adjust_qunit *oqaq = NULL;
         unsigned int qid[MAXQUOTAS] = { 0, 0 };
         struct lustre_quota_info *info = &mds->mds_quota_info;
index 31978cf..92655e1 100644 (file)
@@ -154,11 +154,10 @@ sub get_linuxdir()
             $dir = $1;
         } elsif ($line =~ /LINUX_OBJ :?= (.*)/) {
             $objdir = $1;
-        } elsif ($line =~ /MODULES_TRUE :?= (.*)/) {
+        } elsif ($line =~ /MODULES_TRUE = #/ ||
+                $line =~ /MODULE_TARGET = $/) {
             # nothing to do if modules are not being built
             return ""
-                if ($1 eq "#");
-            last;
         }
     }
     $config->close();
@@ -167,7 +166,7 @@ sub get_linuxdir()
         !$ver->open("$objdir/include/linux/version.h") &&
         !$ver->open("$dir/include/linux/utsrelease.h") &&
         !$ver->open("$dir/include/linux/version.h")) {
-            die "Run make dep on $dir\n";
+            die "Run make dep on '$dir'\n";
         }
 
     while(defined($line = <$ver>)) {
index 1852609..b92e942 100644 (file)
@@ -23,7 +23,7 @@ noinst_SCRIPTS += sanity-sec.sh sanity-gss.sh krb5_login.sh setup_kerberos.sh
 noinst_SCRIPTS += recovery-mds-scale.sh run_dd.sh run_tar.sh run_iozone.sh
 noinst_SCRIPTS += run_dbench.sh run_IOR.sh recovery-double-scale.sh
 noinst_SCRIPTS += recovery-random-scale.sh parallel-scale.sh metadata-updates.sh
-noinst_SCRIPTS += lreplicate-test.sh ost-pools.sh rpc.sh
+noinst_SCRIPTS += lustre_rsync-test.sh ost-pools.sh rpc.sh
 nobase_noinst_SCRIPTS = cfg/local.sh
 nobase_noinst_SCRIPTS += acl/make-tree acl/run cfg/ncli.sh
 nobase_noinst_SCRIPTS += racer/dir_create.sh racer/file_create.sh racer/file_list.sh
index 4c467bf..0f8c6b7 100755 (executable)
@@ -23,7 +23,7 @@ fi
 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
 [ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
 
-export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE RACER REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL REPLAY_VBR INSANITY SANITY_QUOTA SANITY_SEC SANITY_GSS PERFORMANCE_SANITY LARGE_SCALE RECOVERY_MDS_SCALE RECOVERY_DOUBLE_SCALE RECOVERY_RANDOM_SCALE PARALLEL_SCALE LREPLICATE_TEST METADATA_UPDATES OST_POOLS SANITY_BENCHMARK"
+export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE RACER REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL REPLAY_VBR INSANITY SANITY_QUOTA SANITY_SEC SANITY_GSS PERFORMANCE_SANITY LARGE_SCALE RECOVERY_MDS_SCALE RECOVERY_DOUBLE_SCALE RECOVERY_RANDOM_SCALE PARALLEL_SCALE LUSTRE_RSYNC_TEST METADATA_UPDATES OST_POOLS SANITY_BENCHMARK"
 
 if [ "$ACC_SM_ONLY" ]; then
     for O in $TESTSUITE_LIST; do
@@ -440,12 +440,12 @@ if [ "$SANITY_GSS" != "no" ]; then
 fi
 
 
-[ "$LREPLICATE_TEST" != "no" ] && skip_remmds lreplicate-test && LREPLICATE_TEST=no && MSKIPPED=1
-[ "$LREPLICATE_TEST" != "no" ] && skip_remost lreplicate-test && LREPLICATE_TEST=no && OSKIPPED=1
-if [ "$LREPLICATE_TEST" != "no" ]; then
-        title lreplicate-test
-        bash lreplicate-test.sh
-        LREPLICATE_TEST="done"
+[ "$LUSTRE_RSYNC_TEST" != "no" ] && skip_remmds lustre_rsync-test && LUSTRE_RSYNC_TEST=no && MSKIPPED=1
+[ "$LUSTRE_RSYNC_TEST" != "no" ] && skip_remost lustre_rsync-test && LUSTRE_RSYNC_TEST=no && OSKIPPED=1
+if [ "$LUSTRE_RSYNC_TEST" != "no" ]; then
+        title lustre_rsync-test
+        bash lustre_rsync-test.sh
+        LUSTRE_RSYNC_TEST="done"
 fi
 
 [ "$OST_POOLS" != "no" ] && skip_remmds ost-pools && OST_POOLS=no && MSKIPPED=1
index df05ea9..f843eea 100644 (file)
@@ -21,7 +21,7 @@ for num in $(seq $MDSCOUNT); do
     eval mds${num}failover_HOST=\$\{mds${num}failover_HOST:-$mdsfailover_HOST\}
 done
 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
-MDSSIZE=${MDSSIZE:-100000}
+MDSSIZE=${MDSSIZE:-200000}
 MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
 
 MGSDEV=${MGSDEV:-$MDSDEV1}
index e300c28..ec250fb 100644 (file)
@@ -1747,7 +1747,7 @@ test_47() { #17674
 
         facet_failover ost1
         facet_failover $SINGLEMDS
-        df -h $MOUNT || return 3
+        client_up || return 3
 
         count=0
         for ns in $($LCTL get_param ldlm.namespaces.$FSNAME-*-*-*.lru_size); do
index 97890d8..f3feac6 100644 (file)
@@ -240,7 +240,8 @@ int t2(int argc, char* argv[])
         }
 
         t_fcntl(fd, F_SETFL, O_APPEND);
-        if (!(rc = t_fcntl(fd, F_GETFL)) & O_APPEND) {
+        rc = t_fcntl(fd, F_GETFL);
+        if ((rc & O_APPEND) == 0) {
                 fprintf(stderr, "error get flag: ret %x\n", rc);
                 return EXIT_FAILURE;
         }
index 690322c..173c6ac 100755 (executable)
@@ -173,7 +173,7 @@ test_2() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
 
     shutdown_facet $SINGLEMDS
     reboot_facet $SINGLEMDS
@@ -182,7 +182,7 @@ test_2() {
     change_active $SINGLEMDS
     reboot_facet $SINGLEMDS
 
-    client_df &
+    clients_up &
     DFPID=$!
     sleep 5
 
@@ -200,7 +200,7 @@ test_2() {
     wait $DFPID
     clients_recover_osts ost1
     echo "Verify reintegration"
-    client_df || return 1
+    clients_up || return 1
 
 }
 run_test 2 "Second Failure Mode: MDS/OST `date`"
@@ -218,7 +218,7 @@ test_3() {
     #Check FS
 
     echo "Test Lustre stability after MDS failover"
-    client_df
+    clients_up
 
     #CLIENT Portion
     echo "Failing 2 CLIENTS"
@@ -226,13 +226,13 @@ test_3() {
     
     #Check FS
     echo "Test Lustre stability after CLIENT failure"
-    client_df
+    clients_up
     
     #Reintegration
     echo "Reintegrating CLIENTS"
     reintegrate_clients || return 1
 
-    client_df || return 3
+    clients_up || return 3
     sleep 2 # give it a little time for fully recovered before next test
 }
 run_test 3  "Thirdb Failure Mode: MDS/CLIENT `date`"
@@ -247,7 +247,7 @@ test_4() {
  
     #Check FS
     echo "Test Lustre stability after OST failure"
-    client_df &
+    clients_up &
     DFPIDA=$!
     sleep 5
 
@@ -259,7 +259,7 @@ test_4() {
     change_active $SINGLEMDS
     reboot_facet $SINGLEMDS
 
-    client_df &
+    clients_up &
     DFPIDB=$!
     sleep 5
 
@@ -277,7 +277,7 @@ test_4() {
     wait $DFPIDB
     clients_recover_osts ost1
     echo "Test Lustre stability after MDS failover"
-    client_df || return 1
+    clients_up || return 1
 }
 run_test 4 "Fourth Failure Mode: OST/MDS `date`"
 ###################################################
@@ -292,7 +292,7 @@ test_5() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     
     #OST Portion
     shutdown_facet ost1
@@ -300,7 +300,7 @@ test_5() {
     
     #Check FS
     echo "Test Lustre stability after OST failure"
-    client_df &
+    clients_up &
     DFPIDA=$!
     sleep 5
     
@@ -310,7 +310,7 @@ test_5() {
 
     #Check FS
     echo "Test Lustre stability after OST failure"
-    client_df &
+    clients_up &
     DFPIDB=$!
     sleep 5
 
@@ -327,7 +327,7 @@ test_5() {
 
     wait $DFPIDA
     wait $DFPIDB
-    client_df || return 2
+    clients_up || return 2
 }
 run_test 5 "Fifth Failure Mode: OST/OST `date`"
 ###################################################
@@ -340,7 +340,7 @@ test_6() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     client_touch testfile || return 2
        
     #OST Portion
@@ -349,7 +349,7 @@ test_6() {
 
     #Check FS
     echo "Test Lustre stability after OST failure"
-    client_df &
+    clients_up &
     DFPIDA=$!
     echo DFPIDA=$DFPIDA
     sleep 5
@@ -360,7 +360,7 @@ test_6() {
     
     #Check FS
     echo "Test Lustre stability after CLIENTs failure"
-    client_df &
+    clients_up &
     DFPIDB=$!
     echo DFPIDB=$DFPIDB
     sleep 5
@@ -372,13 +372,13 @@ test_6() {
     reintegrate_clients || return 1
     sleep 5 
 
-    wait_remote_prog df $((TIMEOUT * 3 + 10)) 
+    wait_remote_prog df $((TIMEOUT * 3 + 20)) 
     wait $DFPIDA
     wait $DFPIDB
 
     echo "Verifying mount"
     [ -z "$(mounted_lustre_filesystems)" ] && return 3
-    client_df
+    clients_up
 }
 run_test 6 "Sixth Failure Mode: OST/CLIENT `date`"
 ###################################################
@@ -392,7 +392,7 @@ test_7() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     client_touch testfile  || return 1
 
     #CLIENT Portion
@@ -401,7 +401,7 @@ test_7() {
     
     #Check FS
     echo "Test Lustre stability after CLIENTs failure"
-    client_df
+    clients_up
     $PDSH $LIVE_CLIENT "ls -l $TESTDIR"
     $PDSH $LIVE_CLIENT "rm -f $TESTDIR/*_testfile"
     
@@ -413,7 +413,7 @@ test_7() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && return 2
 
-    client_df
+    clients_up
     client_rm testfile
 
     #MDS Portion
@@ -425,7 +425,7 @@ test_7() {
     #Reintegration
     echo "Reintegrating CLIENTs"
     reintegrate_clients || return 2
-    client_df
+    clients_up
     
     #Sleep
     echo "wait 1 minutes"
@@ -443,7 +443,7 @@ test_8() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     client_touch testfile
        
     #CLIENT Portion
@@ -452,7 +452,7 @@ test_8() {
 
     #Check FS
     echo "Test Lustre stability after CLIENTs failure"
-    client_df
+    clients_up
     $PDSH $LIVE_CLIENT "ls -l $TESTDIR"
     $PDSH $LIVE_CLIENT "rm -f $TESTDIR/*_testfile"
 
@@ -464,7 +464,7 @@ test_8() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     client_touch testfile
 
 
@@ -474,7 +474,7 @@ test_8() {
 
     #Check FS
     echo "Test Lustre stability after OST failure"
-    client_df &
+    clients_up &
     DFPID=$!
     sleep 5
     #non-failout hangs forever here
@@ -487,7 +487,7 @@ test_8() {
     wait_for ost1
     start_ost 1
     wait $DFPID
-    client_df || return 1
+    clients_up || return 1
     client_touch testfile2 || return 2
 
     #Sleep
@@ -506,7 +506,7 @@ test_9() {
     echo "Verify Lustre filesystem is up and running"
     [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
 
-    client_df
+    clients_up
     client_touch testfile || return 1
        
     #CLIENT Portion
@@ -515,7 +515,7 @@ test_9() {
 
     #Check FS
     echo "Test Lustre stability after CLIENTs failure"
-    client_df
+    clients_up
     $PDSH $LIVE_CLIENT "ls -l $TESTDIR" || return 1
     $PDSH $LIVE_CLIENT "rm -f $TESTDIR/*_testfile" || return 2
 
@@ -525,7 +525,7 @@ test_9() {
 
     #Create files
     echo "Verify Lustre filesystem is up and running"
-    $PDSH $LIVE_CLIENT df $MOUNT || return 3
+    client_up $LIVE_CLIENT || return 3
     client_touch testfile || return 4
 
     #CLIENT Portion
@@ -534,14 +534,14 @@ test_9() {
     
     #Check FS
     echo "Test Lustre stability after CLIENTs failure"
-    client_df
+    clients_up
     $PDSH $LIVE_CLIENT "ls -l $TESTDIR" || return 5
     $PDSH $LIVE_CLIENT "rm -f $TESTDIR/*_testfile" || return 6
 
     #Reintegration
     echo "Reintegrating  CLIENTs/CLIENTs"
     reintegrate_clients || return 7
-    client_df
+    clients_up
     
     #Sleep
     echo "Wait 1 minutes"
similarity index 85%
rename from lustre/tests/lreplicate-test.sh
rename to lustre/tests/lustre_rsync-test.sh
index 563839d..ef24c38 100644 (file)
@@ -10,7 +10,7 @@ SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$LREPLICATE_EXCEPT 5a 5b"
+ALWAYS_EXCEPT="$LRSYNC_EXCEPT 5a 5b"
 # bug number for skipped test: -  20878
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
@@ -20,7 +20,7 @@ ALWAYS_EXCEPT="$LREPLICATE_EXCEPT 5a 5b"
 KILL=/bin/kill
 
 TMP=${TMP:-/tmp}
-LREPL_LOG=$TMP/lreplicate.log
+LREPL_LOG=$TMP/lustre_rsync.log
 ORIG_PWD=${PWD}
 
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
@@ -41,9 +41,9 @@ assert_DIR
 
 build_test_filter
 
-export LREPLICATE=${LREPLICATE:-"$LUSTRE/utils/lreplicate"}
-[ ! -f "$LREPLICATE" ] && export LREPLICATE=$(which lreplicate)
-export LREPLICATE="$LREPLICATE -v" # -a
+export LRSYNC=${LRSYNC:-"$LUSTRE/utils/lustre_rsync"}
+[ ! -f "$LRSYNC" ] && export LRSYNC=$(which lustre_rsync)
+export LRSYNC="$LRSYNC -v" # -a
 
 # control the time of tests
 DBENCH_TIME=${DBENCH_TIME:-60}  # No of seconds to run dbench
@@ -62,9 +62,9 @@ init_changelog() {
 }
 
 init_src() {
-    rm -rf $TGT/$tdir $TGT/d*.lreplicate-test 2> /dev/null
-    rm -rf $TGT2/$tdir $TGT2/d*.lreplicate-test 2> /dev/null
-    rm -rf ${DIR}/$tdir $DIR/d*.lreplicate-test ${DIR}/tgt 2> /dev/null
+    rm -rf $TGT/$tdir $TGT/d*.lustre_rsync-test 2> /dev/null
+    rm -rf $TGT2/$tdir $TGT2/d*.lustre_rsync-test 2> /dev/null
+    rm -rf ${DIR}/$tdir $DIR/d*.lustre_rsync-test ${DIR}/tgt 2> /dev/null
     rm -f $LREPL_LOG
     mkdir -p $TGT
     mkdir -p $TGT2
@@ -144,7 +144,7 @@ test_1() {
 
     # Replicate
     echo "Replication #1"
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
 
     # Set attributes
     chmod 000 $DIR/$tdir/d2/file3
@@ -157,7 +157,7 @@ test_1() {
     fi
 
     echo "Replication #2"
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
 
     if [ "$xattr" == "yes" ]; then
        local xval1=$(getfattr -n user.foo --absolute-names --only-values \
@@ -200,7 +200,7 @@ test_2a() {
     sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME || error "dbench failed!"
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
 
     # Use diff to compare the source and the destination
     check_diff $DIR/$tdir $TGT/$tdir
@@ -230,7 +230,7 @@ test_2b() {
     $KILL -SIGSTOP $child_pid
 
     echo Starting replication
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir
 
     echo Resuming dbench
@@ -241,7 +241,7 @@ test_2b() {
     $KILL -SIGSTOP $child_pid
 
     echo Starting replication
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir
 
     echo "Wait for dbench to finish"
@@ -250,7 +250,7 @@ test_2b() {
 
     # Replicate the changes to $TGT
     echo Starting replication
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
 
     check_diff $DIR/$tdir $TGT/$tdir
     check_diff $DIR/$tdir $TGT2/$tdir
@@ -275,8 +275,8 @@ test_2c() {
     local quit=0
     while [ $quit -le 1 ];
     do
-        echo "Running lreplicate"
-        $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m ${mds1_svc} -u $CL_USER -l $LREPL_LOG
+        echo "Running lustre_rsync"
+        $LRSYNC -s $DIR -t $TGT -t $TGT2 -m ${mds1_svc} -u $CL_USER -l $LREPL_LOG
         sleep 5
         pgrep dbench
         if [ $? -ne 0 ]; then
@@ -306,7 +306,7 @@ test_3a() {
     createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed!"
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir   
     check_diff $DIR/$tdir $TGT2/$tdir
 
@@ -330,7 +330,7 @@ test_3b() {
     writemany -q -a $DIR/$tdir/$tfile $time $threads || error "writemany failed!"
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
 
     check_diff $DIR/$tdir $TGT/$tdir   
     check_diff $DIR/$tdir $TGT2/$tdir
@@ -354,7 +354,7 @@ test_3c() {
     unlinkmany $DIR/$tdir/$tfile $numfiles || error "unlinkmany failed!"
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir   
     check_diff $DIR/$tdir $TGT2/$tdir
 
@@ -385,7 +385,7 @@ test_4() {
     $KILL -SIGSTOP $child_pid
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0  -u $CL_USER -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir
     check_diff $DIR/$tdir $TGT2/$tdir
 
@@ -406,7 +406,7 @@ test_4() {
       sleep 1;
     done
 
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir
     check_diff $DIR/$tdir $TGT2/$tdir
 
@@ -416,7 +416,7 @@ test_4() {
 }
 run_test 4 "Replicate files created by iozone"
 
-# Test 5a - Stop / start lreplicate
+# Test 5a - Stop / start lustre_rsync
 test_5a() {
     [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
 
@@ -429,12 +429,12 @@ test_5a() {
 
     # Replicate the changes to $TGT
     
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG &
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG &
     local child_pid=$!
     sleep 30
     $KILL -SIGHUP $child_pid
     wait
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
 
     check_diff $DIR/$tdir $TGT/$tdir   
     check_diff $DIR/$tdir $TGT2/$tdir
@@ -443,9 +443,9 @@ test_5a() {
     cleanup_src_tgt
     return 0
 }
-run_test 5a "Stop / start lreplicate"
+run_test 5a "Stop / start lustre_rsync"
 
-# Test 5b - Kill / restart lreplicate
+# Test 5b - Kill / restart lustre_rsync
 test_5b() {
     [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
 
@@ -458,12 +458,12 @@ test_5b() {
 
     # Replicate the changes to $TGT
     
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG &
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG &
     local child_pid=$!
     sleep 30
     $KILL -SIGKILL $child_pid
     wait
-    $LREPLICATE -l $LREPL_LOG
+    $LRSYNC -l $LREPL_LOG
 
     check_diff $DIR/$tdir $TGT/$tdir   
     check_diff $DIR/$tdir $TGT2/$tdir
@@ -472,9 +472,9 @@ test_5b() {
     cleanup_src_tgt
     return 0
 }
-run_test 5b "Kill / restart lreplicate"
+run_test 5b "Kill / restart lustre_rsync"
 
-# Test 6 - lreplicate large no of hard links
+# Test 6 - lustre_rsync large no of hard links
 test_6() {
     init_src
     init_changelog
@@ -490,7 +490,7 @@ test_6() {
     done
 
     # Replicate the changes to $TGT
-    $LREPLICATE -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -t $TGT2 -m $MDT0 -u $CL_USER -l $LREPL_LOG
     check_diff $DIR/$tdir $TGT/$tdir
     check_diff $DIR/$tdir $TGT2/$tdir
 
@@ -504,9 +504,9 @@ test_6() {
     cleanup_src_tgt
     return 0
 }
-run_test 6 "lreplicate large no of hard links"
+run_test 6 "lustre_rsync large no of hard links"
 
-# Test 7 - lreplicate stripesize
+# Test 7 - lustre_rsync stripesize
 test_7() {
     init_src
     init_changelog
@@ -518,17 +518,17 @@ test_7() {
 
     # To simulate replication to another lustre filesystem, replicate
     # the changes to $DIR/tgt. We can't turn off the changelogs
-    # while we are registered, so lreplicate better not try to 
+    # while we are registered, so lustre_rsync better not try to 
     # replicate the replication steps.  It seems ok :)
     mkdir $DIR/tgt
 
-    $LREPLICATE -s $DIR -t $DIR/tgt -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $DIR/tgt -m $MDT0 -u $CL_USER -l $LREPL_LOG
     check_diff ${DIR}/$tdir $DIR/tgt/$tdir
 
     local i=0
     while [ $i -lt $NUMFILES ];
     do
-      local count=$(( $(lfs getstripe -q $DIR/tgt/$tdir/${tfile}$i | wc -l) - 1))
+      local count=$(lfs getstripe $DIR/tgt/$tdir/${tfile}$i | awk '/stripe_count/ {print $2}')
       if [ $count -ne 2 ]; then
          error "Stripe size not replicated" 
       fi
@@ -538,7 +538,7 @@ test_7() {
     cleanup_src_tgt
     return 0
 }
-run_test 7 "lreplicate stripesize"
+run_test 7 "lustre_rsync stripesize"
 
 # Test 8 - Replicate multiple file/directory moves
 test_8() {
@@ -561,7 +561,7 @@ test_8() {
            mv $DIR/$tdir/d$i $DIR/$tdir/d0$i
     done
 
-    $LREPLICATE -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG
+    $LRSYNC -s $DIR -t $TGT -m $MDT0 -u $CL_USER -l $LREPL_LOG
 
     check_diff ${DIR}/$tdir $TGT/$tdir
 
index 7f47b3d..c7a489f 100644 (file)
@@ -88,8 +88,9 @@ inline void end(char *str) {
         MPI_Barrier(MPI_COMM_WORLD);
         if (verbose > 0 && rank == 0) {
                 gettimeofday(&t2, NULL);
-                elapsed = (t2.tv_sec + ((float)t2.tv_usec/1000000))
-                          - (t1.tv_sec + ((float)t1.tv_usec/1000000));
+
+                elapsed = t2.tv_sec - t1.tv_sec +
+                          (float)(t2.tv_usec-t1.tv_usec)/1000000;
                 if (elapsed >= 60) {
                         printf("%s:\tFinished %-15s(%.2f min)\n",
                                timestamp(), str, elapsed / 60);
index e572e4e..0843deb 100644 (file)
@@ -1013,7 +1013,8 @@ int main(int argc, char *argv[])
 
         if (size < MIN_GLHOST) {
                 fprintf(stderr, "Error: "
-                        "should be at least four tasks to run the test!\n");
+                        "%d tasks run, but should be at least %d tasks to run "
+                        "the test!\n", size, MIN_GLHOST);
                 MPI_Abort(MPI_COMM_WORLD, 2);
         }
 
index 28d5ecd..5bd588c 100755 (executable)
@@ -181,7 +181,6 @@ int get_flags(char *data, int *rflags)
 }
 
 #define POP_ARG() (pop_arg(argc, argv))
-#define min(a,b) ((a)>(b)?(b):(a))
 
 int main(int argc, char **argv)
 {
index 0d0d99c..99c1073 100644 (file)
@@ -1,4 +1,6 @@
 #!/bin/bash
+# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
+# vim:autoindent:shiftwidth=4:tabstop=4:
 #
 # Run select tests by setting ONLY, or as arguments to the script.
 # Skip specific tests by setting EXCEPT.
@@ -140,7 +142,7 @@ check_file_in_osts() {
 
         local ost_count=$($GETSTRIPE $file | grep 0x | wc -l)
         [[ -n "$count" ]] && [[ $ost_count -ne $count ]] && \
-            error "Stripe count $count expected; got $ost_count"
+            { error "Stripe count $count expected; got $ost_count" && return 1; }
                 
         return 0
 }
@@ -170,18 +172,6 @@ check_dir_not_in_pool() {
     fi
 }
 
-create_pool() {
-    do_facet $SINGLEMDS lctl pool_new $FSNAME.$1
-    local RC=$?
-    # get param should return err until pool is created
-    [[ $RC -ne 0 ]] && return $RC
-
-    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$1 \
-        2>/dev/null || echo foo" "" || RC=1
-    [[ $RC -ne 0 ]] && error "pool_new failed"
-    return $RC
-}
-
 drain_pool() {
     pool=$1
     wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$pool" ""\
@@ -205,7 +195,7 @@ add_pool() {
 }
 
 create_pool_nofail() {
-    create_pool $1
+    create_pool $FSNAME.$1
     if [[ $? != 0 ]]
     then
         error "Pool creation of $1 failed"
@@ -213,7 +203,7 @@ create_pool_nofail() {
 }
 
 create_pool_fail() {
-    create_pool $1
+    create_pool $FSNAME.$1
     if [[ $? == 0 ]]
     then
         error "Pool creation of $1 succeeded; should have failed"
@@ -239,8 +229,9 @@ remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
 remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
 ost_pools_init
 
-# Tests for new commands added
+trap "cleanup_pools $FSNAME" EXIT
 
+# Tests for new commands added
 test_1() {
     echo "Creating a pool with a 1 character pool name"
     create_pool_nofail p
@@ -262,27 +253,27 @@ test_1() {
     create_pool_fail $NAME
 
     echo "pool_new should fail if fs-name or poolname are missing."
-    do_facet $SINGLEMDS lctl pool_new .pool1
+    do_facet $SINGLEMDS lctl pool_new .pool1 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though fs-name was missing."
-    do_facet $SINGLEMDS lctl pool_new pool1
+    do_facet $SINGLEMDS lctl pool_new pool1 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though fs-name was missing."
-    do_facet $SINGLEMDS lctl pool_new ${FSNAME}.
+    do_facet $SINGLEMDS lctl pool_new ${FSNAME}. 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though pool name was missing."
-    do_facet $SINGLEMDS lctl pool_new .
+    do_facet $SINGLEMDS lctl pool_new . 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though pool name and fs-name " \
             "were missing."
-    do_facet $SINGLEMDS lctl pool_new ${FSNAME},pool1
+    do_facet $SINGLEMDS lctl pool_new ${FSNAME},pool1 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though pool name format was wrong"
-    do_facet $SINGLEMDS lctl pool_new ${FSNAME}/pool1
+    do_facet $SINGLEMDS lctl pool_new ${FSNAME}/pool1 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though pool name format was wrong"
 
-    do_facet $SINGLEMDS lctl pool_new ${FSNAME}.p
+    do_facet $SINGLEMDS lctl pool_new ${FSNAME}.p 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_new did not fail even though pool1 existed"
     destroy_pool p
@@ -293,7 +284,7 @@ run_test 1 "Test lctl pool_new  ========================================="
 test_2a() {
     destroy_pool $POOL
 
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $FSNAME-OST0000
+    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $FSNAME-OST0000 2>/dev/null
     [[ $? -ne 0 ]] || \
         error " pool_add did not fail even though pool did " \
         " not exist."
@@ -302,7 +293,7 @@ run_test 2a "pool_add: non-existant pool"
 
 test_2b() {
     do_facet $SINGLEMDS lctl pool_add $FSNAME.p1234567891234567890 \
-        $FSNAME-OST0000
+        $FSNAME-OST0000 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_add did not fail even though pool name was invalid."
 }
@@ -417,15 +408,14 @@ test_3a() {
     [[ $? -ne 0 ]] || \
         destroy_pool $POOL
 
-    do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000
+    do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $FSNAME-OST0000 2>/dev/null
     [[ $? -ne 0 ]] || \
-        error "pool_remove did not fail even though" \
-        "pool did not exist."
+        error "pool_remove did not fail even though pool did not exist."
 }
 run_test 3a "pool_remove: non-existant pool"
 
 test_3b() {
-    do_facet $SINGLEMDS lctl pool_remove ${NON_EXISTANT_FS}.$POOL OST0000
+    do_facet $SINGLEMDS lctl pool_remove ${NON_EXISTANT_FS}.$POOL OST0000 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_remove did not fail even though fsname did not exist."
 }
@@ -433,13 +423,12 @@ run_test 3b "pool_remove: non-existant fsname"
 
 test_3c() {
     do_facet $SINGLEMDS lctl pool_remove $FSNAME.p1234567891234567890 \
-        $FSNAME-OST0000
+        $FSNAME-OST0000 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_remove did not fail even though pool name was invalid."
 }
 run_test 3c "pool_remove: Invalid pool name"
 
-
 # Testing various combinations of OST name list
 test_3d() {
     lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null
@@ -480,14 +469,14 @@ test_4a() {
     [[ $? -ne 0 ]] || \
         destroy_pool $POOL
 
-    do_facet $SINGLEMDS lctl pool_destroy $FSNAME.$POOL
+    do_facet $SINGLEMDS lctl pool_destroy $FSNAME.$POOL 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_destroy did not fail even though pool did not exist."
 }
 run_test 4a "pool_destroy: non-existant pool"
 
 test_4b() {
-    do_facet $SINGLEMDS lctl pool_destroy ${NON_EXISTANT_FS}.$POOL
+    do_facet $SINGLEMDS lctl pool_destroy ${NON_EXISTANT_FS}.$POOL 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_destroy did not fail even though the filesystem did not exist."
 }
@@ -499,7 +488,7 @@ test_4c() {
 
     do_facet $SINGLEMDS lctl pool_destroy ${FSNAME}.$POOL
     [[ $? -ne 0 ]] || \
-        error "pool_destroy succeeded with a non-empty pool name."
+        error "pool_destroy succeeded with a non-empty pool."
     destroy_pool $POOL
 }
 run_test 4c "pool_destroy: non-empty pool ==============================="
@@ -507,12 +496,12 @@ run_test 4c "pool_destroy: non-empty pool ==============================="
 sub_test_5() {
     local LCMD=$1
 
-    $LCMD pool_list
+    $LCMD pool_list 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_list did not fail even though fsname was not mentioned."
 
-    destroy_pool $POOL
-    destroy_pool $POOL2
+    destroy_pool $POOL 2>/dev/null
+    destroy_pool $POOL2 2>/dev/null
 
     create_pool_nofail $POOL
     create_pool_nofail $POOL2
@@ -526,11 +515,11 @@ sub_test_5() {
     [[ $? -eq 0 ]] || \
         error "pool_list $FSNAME.$POOL failed."
 
-    $LCMD pool_list ${NON_EXISTANT_FS}
+    $LCMD pool_list ${NON_EXISTANT_FS} 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_list did not fail for a non-existant fsname $NON_EXISTANT_FS"
 
-    $LCMD pool_list ${FSNAME}.$NON_EXISTANT_POOL
+    $LCMD pool_list ${FSNAME}.$NON_EXISTANT_POOL 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_list did not fail for a non-existant pool $NON_EXISTANT_POOL"
 
@@ -547,7 +536,7 @@ sub_test_5() {
     fi
 
     rm -rf ${DIR}nonexistant
-    $LCMD pool_list ${DIR}nonexistant
+    $LCMD pool_list ${DIR}nonexistant 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "pool_list did not fail for invalid mountpoint ${DIR}nonexistant"
 
@@ -578,7 +567,7 @@ test_6() {
     [[ $? -eq 0 ]] || \
         error "pool_list $FSNAME failed."
 
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $TGT_ALL
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
 
     mkdir -p $POOL_DIR
     $SETSTRIPE -c -1 -p $POOL $POOL_DIR
@@ -587,14 +576,14 @@ test_6() {
     check_dir_in_pool $POOL_DIR $POOL
 
     # If an invalid pool name is specified, the command should fail
-    $SETSTRIPE -c 2 -p $INVALID_POOL $POOL_DIR
+    $SETSTRIPE -c 2 -p $INVALID_POOL $POOL_DIR 2>/dev/null
     [[ $? -ne 0 ]] || \
-        error_ignore 19919 "setstripe to invalid pool did not fail."
+        error "setstripe to invalid pool did not fail."
 
     # If the pool name does not exist, the command should fail
-    $SETSTRIPE -c 2 -p $NON_EXISTANT_POOL $POOL_DIR
+    $SETSTRIPE -c 2 -p $NON_EXISTANT_POOL $POOL_DIR 2>/dev/null
     [[ $? -ne 0 ]] || \
-        error_ignore 19919 "setstripe to non-existant pool did not fail."
+        error "setstripe to non-existant pool did not fail."
 
     # lfs setstripe should work as before if a pool name is not specified.
     $SETSTRIPE -c -1 $POOL_DIR
@@ -608,7 +597,7 @@ test_6() {
     # pool is specified.
     create_pool_nofail $POOL2
     add_pool $POOL2 "OST0000" "$FSNAME-OST0000_UUID "
-    $SETSTRIPE -o 1 -p $POOL2 $ROOT_POOL/$tfile
+    $SETSTRIPE -o 1 -p $POOL2 $ROOT_POOL/$tfile 2>/dev/null
     [[ $? -ne 0 ]] || \
         error "$SETSTRIPE with start index outside the pool did not fail."
 
@@ -620,17 +609,17 @@ run_test 6 "getstripe/setstripe"
 test_11() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
 
-    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+    [[ $OSTCOUNT -le 1 ]] && skip_env "Need atleast 2 OSTs" && return
 
     create_pool_nofail $POOL
     create_pool_nofail $POOL2
 
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL \
-        $FSNAME-OST[$TGT_FIRST-$TGT_MAX/2]
     local start=$((TGT_FIRST+1))
     do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL2 \
         $FSNAME-OST[$start-$TGT_MAX/2]
 
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
     create_dir $POOL_ROOT/dir1  $POOL
     create_dir $POOL_ROOT/dir2  $POOL2
     check_dir_in_pool $POOL_ROOT/dir1 $POOL
@@ -662,17 +651,17 @@ run_test 11 "OSTs in overlapping/multiple pools"
 test_12() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
 
-    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+    [[ $OSTCOUNT -le 2 ]] && skip_env "Need atleast 3 OSTs" && return
 
     create_pool_nofail $POOL
     create_pool_nofail $POOL2
 
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL \
-        $FSNAME-OST[$TGT_FIRST-$TGT_MAX/2]
     local start=$((TGT_FIRST+1))
     do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL2 \
         $FSNAME-OST[$start-$TGT_MAX/2]
 
+    add_pool $POOL $TGT_HALF "$TGT_UUID2"
+
     echo creating some files in $POOL and $POOL2
 
     create_dir $POOL_ROOT/dir1  $POOL
@@ -689,7 +678,8 @@ test_12() {
     echo Changing the pool membership
     do_facet $SINGLEMDS lctl pool_remove $FSNAME.$POOL $FSNAME-OST[$TGT_FIRST]
     do_facet $SINGLEMDS lctl pool_list $FSNAME.$POOL
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL2 $FSNAME-OST[$TGT_FIRST]
+       FIRST_UUID=$(echo $TGT_UUID | awk '{print $1}')
+    add_pool $POOL2 $FSNAME-OST[$TGT_FIRST] "$FIRST_UUID "
     do_facet $SINGLEMDS lctl pool_list $FSNAME.$POOL2
 
     echo Checking the files again    
@@ -700,7 +690,7 @@ test_12() {
 
     echo Creating some more files
     create_dir $POOL_ROOT/dir3 $POOL
-    create_dir $POOL_ROOT/dir4 POOL2
+    create_dir $POOL_ROOT/dir4 $POOL2
     create_file $POOL_ROOT/file3 $POOL
     create_file $POOL_ROOT/file4 $POOL2
 
@@ -716,14 +706,14 @@ test_12() {
 run_test 12 "OST Pool Membership"
 
 test_13() {
-    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+    [[ $OSTCOUNT -le 2 ]] && skip_env "Need atleast 3 OSTs" && return
 
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
     local numfiles=10
     local count=3
 
     create_pool_nofail $POOL
-    do_facet $SINGLEMDS lctl pool_add $FSNAME.$POOL $TGT_ALL
+    add_pool $POOL $TGT_ALL "$TGT_UUID"
 
     create_dir $POOL_ROOT/dir1 $POOL -1
     createmany -o $POOL_ROOT/dir1/$tfile $numfiles || \
@@ -779,7 +769,7 @@ test_13() {
 run_test 13 "Striping characteristics in a pool"
 
 test_14() {
-    [[ $OSTCOUNT -le 2 ]] && skip "Need atleast 3 OSTs" && return
+    [[ $OSTCOUNT -le 2 ]] && skip_env "Need atleast 3 OSTs" && return
 
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
     local numfiles=100
@@ -1082,7 +1072,7 @@ run_test 20 "Different pools in a directory hierarchy."
 
 test_21() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
-    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+    [[ $OSTCOUNT -le 1 ]] && skip_env "Need atleast 2 OSTs" && return
 
     local numfiles=12
     local i=0
@@ -1113,22 +1103,26 @@ add_loop() {
     for c in $(seq 1 10);
     do
         echo "Pool $pool, iteration $c"
-        create_pool_nofail $pool
-        local TGT=$(for i in `seq $TGT_FIRST $step $TGT_MAX`; \
-            do printf "$FSNAME-OST%04x_UUID " $i; done)
-        add_pool $pool "$FSNAME-OST[$TGT_FIRST-$TGT_MAX/$step]" "$TGT"
-        destroy_pool $pool
-        do_facet $SINGLEMDS lctl pool_list $FSNAME
+       do_facet $SINGLEMDS lctl pool_add $FSNAME.$pool OST[$TGT_FIRST-$TGT_MAX/$step] 2>/dev/null
+       local TGT_SECOND=$(($TGT_FIRST+$step))
+       if [ "$TGT_SECOND" -le "$TGT_MAX" ]; then
+           do_facet $SINGLEMDS lctl pool_remove $FSNAME.$pool OST[$TGT_SECOND-$TGT_MAX/$step]
+       fi
     done
     echo loop for $pool complete
 }
 
 test_22() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
-    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+    [[ $OSTCOUNT -le 1 ]] && skip_env "Need at least 2 OSTs" && return
 
     local numfiles=100
 
+    create_pool_nofail $POOL
+    add_pool $POOL "OST0000" "$FSNAME-OST0000_UUID "
+    create_pool_nofail $POOL2
+    add_pool $POOL2 "OST0000" "$FSNAME-OST0000_UUID "
+
     add_loop $POOL 1 &
     add_loop $POOL2 2 &
     sleep 5
@@ -1137,27 +1131,32 @@ test_22() {
           error "createmany $POOL_ROOT/${tfile} failed!"
     wait
 
+    destroy_pool $POOL
+    destroy_pool $POOL2
+
     return 0
 }
 run_test 22 "Simultaneous manipulation of a pool"
 
 test_23() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
-    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+    [[ $OSTCOUNT -le 1 ]] && skip_env "Need atleast 2 OSTs" && return
 
     mkdir -p $POOL_ROOT
     check_runas_id $TSTID $TSTID $RUNAS  || {
-        skip "User $RUNAS_ID does not exist - skipping"
+        skip_env "User $RUNAS_ID does not exist - skipping"
         return 0
     }
 
-    local numfiles=12
     local i=0
     local TGT
-    local LIMIT=1024
+    local BLK_SZ=1024
+    local BUNIT_SZ=1024        # min block quota unit(kB)
+    local LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1`
+    local OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd`
+    local LIMIT
     local dir=$POOL_ROOT/dir
-    local file1="$dir/$tfile-quota1"
-    local file2="$dir/$tfile-quota2"
+    local file="$dir/$tfile-quota"
 
     create_pool_nofail $POOL
 
@@ -1168,19 +1167,26 @@ test_23() {
 
     $LFS quotaoff -ug $MOUNT
     $LFS quotacheck -ug $MOUNT
-    $LFS setquota -u $TSTUSR -b $LIMIT -B $LIMIT $dir #-i 5 -I 5 $dir
-
-    $LFS setstripe $file1 -c 1 -p $POOL
-    chown $TSTUSR.$TSTUSR $file1
-    ls -l $file1
+    LIMIT=$((BUNIT_SZ * (OSTCOUNT + 1)))
+    $LFS setquota -u $TSTUSR -b $LIMIT -B $LIMIT $dir
+    sleep 3
+    $LFS quota -v -u $TSTUSR $dir
+
+    $LFS setstripe $file -c 1 -p $POOL
+    chown $TSTUSR.$TSTUSR $file
+    ls -l $file
     type runas
 
-    stat=$(LC_ALL=C $RUNAS dd if=/dev/zero of=$file1 bs=1024 count=$((LIMIT*2)) 2>&1)
+    LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BLK_SZ count=$((BUNIT_SZ*2)) || true
+    $LFS quota -v -u $TSTUSR $dir
+    cancel_lru_locks osc
+    stat=$(LOCALE=C $RUNAS dd if=/dev/zero of=$file bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ*2)) 2>&1)
     RC=$?
     echo $stat
     [[ $RC -eq 0 ]] && error "dd did not fail with EDQUOT."
-    echo $stat | grep "Disk quota exceeded"
+    echo $stat | grep "Disk quota exceeded" > /dev/null
     [[ $? -eq 1 ]] && error "dd did not fail with EDQUOT."
+    $LFS quota -v -u $TSTUSR $dir
 
     echo "second run"
     $LFS quotaoff -ug $MOUNT
@@ -1191,7 +1197,7 @@ test_23() {
     while [ $RC -eq 0 ];
     do
       i=$((i+1))
-      stat=$(LOCALE=C $RUNAS2 dd if=/dev/zero of=${file2}$i bs=1024 \
+      stat=$(LOCALE=C $RUNAS2 dd if=/dev/zero of=${file}$i bs=1M \
           count=$((LIMIT*LIMIT)) 2>&1)
       RC=$?
       if [ $RC -eq 1 ]; then
@@ -1216,7 +1222,7 @@ run_test 23 "OST pools and quota"
 
 test_24() {
     local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
-    [[ $OSTCOUNT -le 1 ]] && skip "Need atleast 2 OSTs" && return
+    [[ $OSTCOUNT -le 1 ]] && skip_env "Need atleast 2 OSTs" && return
 
     local numfiles=10
     local i=0
@@ -1302,15 +1308,16 @@ test_25() {
 
     for i in $(seq 10); do
         create_pool_nofail pool$i
-        stop $SINGLEMDS -f  || return 1
-        sleep 10
+       do_facet $SINGLEMDS lctl pool_add $FSNAME.pool$i OST0000
+        stop $SINGLEMDS || return 1
         start $SINGLEMDS ${dev} $MDS_MOUNT_OPTS  || \
-            error "Failed to start $SINGLEMDS after stopping" 
+            { error "Failed to start $SINGLEMDS after stopping" && break; }
+       clients_up
 
         # Veriy that the pool got created and is usable
         echo "Creating a file in pool$i"
-        create_file $POOL_ROOT/file$i pool$i
-        check_file_in_pool $POOL_ROOT/file$i pool$i
+        create_file $POOL_ROOT/file$i pool$i || break
+        check_file_in_pool $POOL_ROOT/file$i pool$i || break
     done
 
     rm -rf $POOL_ROOT
@@ -1322,7 +1329,7 @@ run_test 25 "Create new pool and restart MDS ======================="
 
 log "cleanup: ======================================================"
 cd $ORIG_PWD
-cleanup_tests
+cleanup_pools $FSNAME
 check_and_cleanup_lustre
 echo '=========================== finished ==============================='
 [ -f "$POOLSLOG" ] && cat $POOLSLOG && grep -q FAIL $POOLSLOG && exit 1 || true
index 5dac40a..db6299a 100644 (file)
@@ -7,8 +7,8 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-#              bug 20670 
-ALWAYS_EXCEPT="parallel_grouplock  $PARALLEL_SCALE_EXCEPT"
+#              bug 20670           21255 
+ALWAYS_EXCEPT="parallel_grouplock  statahead $PARALLEL_SCALE_EXCEPT"
 
 #
 # compilbench
@@ -321,6 +321,10 @@ test_ior() {
 run_test ior "ior"
  
 test_cascading_rw() {
+    if [ "$NFSCLIENT" ]; then
+        skip "skipped for NFSCLIENT mode"
+    fi
+
     [ x$CASC_RW = x ] &&
         { skip_env "cascading_rw not found" && return; }
 
index 675988c..d4867f5 100644 (file)
@@ -266,6 +266,11 @@ Failed to meet interval $reqfail times ( REQFAIL=$REQFAIL ); have sleep=$sleep"
     fi  
 
     log "$SERVERFACET has failed over ${!var} times, and counting..."
+
+    if [ $((ELAPSED + sleep)) -gt $DURATION ]; then
+         break
+    fi
+
     if [ $sleep -gt 0 ]; then 
         echo "sleeping $sleep seconds ... "
         sleep $sleep
index 2d5b577..01c4e92 100644 (file)
@@ -294,6 +294,10 @@ Failed to meet interval $reqfail times ( REQFAIL=$REQFAIL ); have sleep=$sleep"
     log " Number of failovers:
 $(numfailovers)                and counting..."
 
+    if [ $((ELAPSED + sleep)) -gt $DURATION ]; then
+         break
+    fi
+
     if [ $sleep -gt 0 ]; then 
         echo "sleeping $sleep seconds ... "
         sleep $sleep
index 710a4a6..f910d25 100755 (executable)
@@ -658,6 +658,11 @@ test_26a() {      # was test_26 bug 5921 - evict dead exports by pinger
        remote_ost_nodsh && skip "remote OST with nodsh" && return 0
        remote_mds || { skip "local MDS" && return 0; }
 
+        if [ $(facet_host mgs) = $(facet_host ost1) ]; then
+                skip "msg and ost1 are at the same node"
+                return 0
+        fi
+
        check_timeout || return 1
 
        local OST_NEXP=$(do_facet ost1 lctl get_param -n obdfilter.${ost1_svc}.num_exports | cut -d' ' -f2)
@@ -680,9 +685,15 @@ run_test 26a "evict dead exports"
 test_26b() {      # bug 10140 - evict dead exports by pinger
        remote_ost_nodsh && skip "remote OST with nodsh" && return 0
 
+        if [ $(facet_host mgs) = $(facet_host ost1) ]; then
+                skip "msg and ost1 are at the same node"
+                return 0
+        fi
+
        check_timeout || return 1
-       client_df
-       zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
+       clients_up
+       zconf_mount `hostname` $MOUNT2 ||
+                { error "Failed to mount $MOUNT2"; return 2; }
        sleep 1 # wait connections being established
 
        local MDS_NEXP=$(do_facet $SINGLEMDS lctl get_param -n mdt.${mds1_svc}.num_exports | cut -d' ' -f2)
@@ -741,7 +752,7 @@ test_28() {      # bug 6086 - error adding new clients
        #define OBD_FAIL_MDS_CLIENT_ADD 0x12f
        do_facet $SINGLEMDS "lctl set_param fail_loc=0x8000012f"
        # fail once (evicted), reconnect fail (fail_loc), ok
-       df || (sleep 10; df) || (sleep 10; df) || error "reconnect failed"
+       client_up || (sleep 10; client_up) || (sleep 10; client_up) || error "reconnect failed"
        rm -f $DIR/$tfile
        fail $SINGLEMDS         # verify MDS last_rcvd can be loaded
 }
index 11a3122..cdeae9f 100755 (executable)
@@ -215,7 +215,7 @@ test_12() {
     do_facet $SINGLEMDS lctl set_param fail_loc=0x80000302
     facet_failover $SINGLEMDS
     do_facet $SINGLEMDS lctl set_param fail_loc=0
-    df $MOUNT || return 1
+    clients_up || return 1
 
     ls $DIR/$tfile
     kill -USR1 $MULTIPID || return 3
@@ -240,7 +240,7 @@ test_13() {
     do_facet $SINGLEMDS lctl set_param fail_loc=0x80000115
     facet_failover $SINGLEMDS
     do_facet $SINGLEMDS lctl set_param fail_loc=0
-    df $MOUNT || return 1
+    clients_up || return 1
 
     ls $DIR/$tfile
     $CHECKSTAT -t file $DIR/$tfile || return 2
@@ -259,7 +259,7 @@ test_14a() {
 
     facet_failover $SINGLEMDS
     # expect failover to fail due to missing client 2
-    df $MOUNT && return 1
+    client_evicted || return 1
     sleep 1
 
     # first 25 files should have been replayed 
@@ -305,8 +305,7 @@ test_15a() { # was test_15
     createmany -o $MOUNT2/$tfile-2- 1
     umount $MOUNT2
 
-    facet_failover $SINGLEMDS
-    df $MOUNT || return 1
+    fail $SINGLEMDS
 
     unlinkmany $MOUNT1/$tfile- 25 || return 2
     [ -e $MOUNT1/$tfile-2-0 ] && error "$tfile-2-0 exists"
@@ -321,11 +320,9 @@ test_15c() {
     for ((i = 0; i < 2000; i++)); do
         echo "data" > "$MOUNT2/${tfile}-$i" || error "create ${tfile}-$i failed"
     done
-
     umount $MOUNT2
-    facet_failover $SINGLEMDS
 
-    df $MOUNT || return 1
+    fail $SINGLEMDS
 
     zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
     return 0
@@ -340,8 +337,7 @@ test_16() {
 
     facet_failover $SINGLEMDS
     sleep $TIMEOUT
-    facet_failover $SINGLEMDS
-    df $MOUNT || return 1
+    fail $SINGLEMDS
 
     unlinkmany $MOUNT1/$tfile- 25 || return 2
 
@@ -363,8 +359,7 @@ test_17() {
 
     facet_failover ost1
     sleep $TIMEOUT
-    facet_failover ost1
-    df $MOUNT || return 1
+    fail ost1
 
     unlinkmany $MOUNT1/$tfile- 25 || return 2
 
@@ -417,8 +412,7 @@ test_20() { #16389
     touch $MOUNT1/a
     touch $MOUNT2/b
     umount $MOUNT2
-    facet_failover $SINGLEMDS
-    df $MOUNT1 || return 1
+    fail $SINGLEMDS
     rm $MOUNT1/a
     zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
     TIER1=$((`date +%s` - BEFORE))
@@ -427,8 +421,7 @@ test_20() { #16389
     touch $MOUNT1/a
     touch $MOUNT2/b
     umount $MOUNT2
-    facet_failover $SINGLEMDS
-    df $MOUNT1 || return 1
+    fail $SINGLEMDS
     rm $MOUNT1/a
     zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
     TIER2=$((`date +%s` - BEFORE))
index b2fbff9..f9c9b33 100755 (executable)
@@ -20,7 +20,7 @@ remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
 
 # Skip these tests
 # bug number:  17466 18857,15962
-ALWAYS_EXCEPT="61d   33a 33b  $REPLAY_SINGLE_EXCEPT"
+ALWAYS_EXCEPT="61d   33a 33b     $REPLAY_SINGLE_EXCEPT"
 
 if [ "$FAILURE_MODE" = "HARD" ] && mixed_ost_devs; then
     CONFIG_EXCEPTIONS="0b 42 47 61a 61c"
@@ -474,10 +474,9 @@ test_20b() { # bug 10480
     lfs getstripe $DIR/$tfile || return 1
     rm -f $DIR/$tfile || return 2       # make it an orphan
     mds_evict_client
-    df -P $DIR || df -P $DIR || true    # reconnect
+    client_up || client_up || true    # reconnect
 
     fail $SINGLEMDS                            # start orphan recovery
-    df -P $DIR || df -P $DIR || true    # reconnect
     wait_recovery_complete $SINGLEMDS || error "MDS recovery not done"
     wait_mds_ost_sync || return 3
     AFTERUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
@@ -495,8 +494,7 @@ test_20c() { # bug 10480
     ls -la $DIR/$tfile
 
     mds_evict_client
-
-    df -P $DIR || df -P $DIR || true    # reconnect
+    client_up || client_up || true    # reconnect
 
     kill -USR1 $pid
     wait $pid || return 1
@@ -710,7 +708,7 @@ test_32() {
     multiop_bg_pause $DIR/$tfile O_c || return 3
     pid2=$!
     mds_evict_client
-    df $MOUNT || sleep 1 && df $MOUNT || return 1
+    client_up || client_up || return 1
     kill -USR1 $pid1
     kill -USR1 $pid2
     wait $pid1 || return 4
@@ -808,7 +806,9 @@ test_37() {
     sync
     return 0
 }
+start_full_debug_logging
 run_test 37 "abort recovery before client does replay (test mds_cleanup_orphans for directories)"
+stop_full_debug_logging
 
 test_38() {
     createmany -o $DIR/$tfile-%d 800
@@ -936,7 +936,7 @@ test_43() { # bug 2530
 }
 run_test 43 "mds osc import failure during recovery; don't LBUG"
 
-test_44a() {   # was test_44
+test_44a() { # was test_44
     local at_max_saved=0
 
     mdcdev=`lctl get_param -n devices | awk '/MDT0000-mdc-/ {print $1}'`
@@ -950,12 +950,13 @@ test_44a() {      # was test_44
     fi
 
     for i in `seq 1 10`; do
-       echo "$i of 10 ($(date +%s))"
-       do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
-       #define OBD_FAIL_TGT_CONN_RACE     0x701
-       do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000701"
-       $LCTL --device $mdcdev recover || return 4
-       df $MOUNT
+        echo "$i of 10 ($(date +%s))"
+        do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
+        #define OBD_FAIL_TGT_CONN_RACE     0x701
+        do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000701"
+        # lctl below may fail, it is valid case
+        $LCTL --device $mdcdev recover
+        df $MOUNT
     done
     do_facet $SINGLEMDS "lctl set_param fail_loc=0"
     [ $at_max_saved -ne 0 ] && at_max_set $at_max_saved mds
@@ -970,11 +971,12 @@ test_44b() {
 
     for i in `seq 1 10`; do
         echo "$i of 10 ($(date +%s))"
-       do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
-       #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
-       do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000704"
-       $LCTL --device $mdcdev recover || return 4
-       df $MOUNT
+        do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
+        #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
+        do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000704"
+        # lctl below may fail, it is valid case
+        $LCTL --device $mdcdev recover
+        df $MOUNT
     done
     do_facet $SINGLEMDS "lctl set_param fail_loc=0"
     return 0
@@ -1029,7 +1031,7 @@ test_47() { # bug 2824
     # OBD_FAIL_OST_CREATE_NET 0x204
     fail ost1
     do_facet ost1 "lctl set_param fail_loc=0x80000204"
-    df $MOUNT || return 2
+    client_up || return 2
 
     # let the MDS discover the OST failure, attempt to recover, fail
     # and recover again.
@@ -1053,7 +1055,7 @@ test_48() {
     # OBD_FAIL_OST_EROFS 0x216
     facet_failover $SINGLEMDS
     do_facet ost1 "lctl set_param fail_loc=0x80000216"
-    df $MOUNT || return 2
+    client_up || return 2
 
     createmany -o $DIR/$tfile 20 20 || return 2
     unlinkmany $DIR/$tfile 40 || return 3
@@ -1523,8 +1525,7 @@ test_62() { # Bug 15756 - don't mis-drop resent replay
     createmany -o $DIR/$tdir/$tfile- 25
 #define OBD_FAIL_TGT_REPLAY_DROP         0x707
     do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000707"
-    facet_failover $SINGLEMDS
-    df $MOUNT || return 1
+    fail $SINGLEMDS
     do_facet $SINGLEMDS "lctl set_param fail_loc=0"
     unlinkmany $DIR/$tdir/$tfile- 25 || return 2
     return 0
@@ -1730,10 +1731,21 @@ test_67b() #bug 3055
 
     at_start || return 0
     CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
+
+    # exhaust precreations on ost1
+    local OST=$(lfs osts | grep 0": " | awk '{print $2}' | sed -e 's/_UUID$//')
+    local mdtosc=$(get_mdtosc_proc_path $OST)
+    local last_id=$(do_facet mds lctl get_param -n osc.$mdtosc.prealloc_last_id)
+    local next_id=$(do_facet mds lctl get_param -n osc.$mdtosc.prealloc_next_id)
+
+    mkdir -p $DIR/$tdir/${OST}
+    lfs setstripe $DIR/$tdir/${OST} -o 0 -c 1 || error "setstripe"
+    echo "Creating to objid $last_id on ost $OST..."
 #define OBD_FAIL_OST_PAUSE_CREATE        0x223
     do_facet ost1 "sysctl -w lustre.fail_val=20000"
     do_facet ost1 "sysctl -w lustre.fail_loc=0x80000223"
-    cp /etc/profile $DIR/$tfile || error "cp failed"
+    createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
+
     client_reconnect
     do_facet ost1 "lctl get_param -n ost.OSS.ost_create.timeouts"
     log "phase 2"
@@ -1914,7 +1926,7 @@ test_74() {
     mount_facet ost1
     touch $DIR/$tfile || return 1
     rm $DIR/$tfile || return 2
-    client_df || error "df failed: $?"
+    clients_up || error "client evicted: $?"
     return 0
 }
 run_test 74 "Ensure applications don't fail waiting for OST recovery"
@@ -2074,7 +2086,7 @@ test_84a() {
     PID=$!
     mds_evict_client
     wait $PID
-    df -P $DIR || df -P $DIR || true    # reconnect
+    client_up || client_up || true    # reconnect
 }
 run_test 84a "stale open during export disconnect"
 
index 98224e9..b36e2a9 100644 (file)
@@ -111,7 +111,7 @@ test_0b() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
         error "open succeeded unexpectedly"
     fi
@@ -132,8 +132,8 @@ test_0c() {
     rmultiop_start $CLIENT1 $DIR/$tdir/$tfile o_c
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
+    client_up $CLIENT1 || error "$CLIENT1 evicted"
 
-    do_node $CLIENT1 df $MOUNT || error "$CLIENT1 evicted"
     rmultiop_stop $CLIENT1 || error "close failed"
     zconf_mount $CLIENT2 $MOUNT
 }
@@ -164,7 +164,7 @@ test_0e() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
         error "create succeeded unexpectedly"
     fi
@@ -199,7 +199,7 @@ test_0g() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
         error "unlink succeeded unexpectedly"
     fi
@@ -250,7 +250,7 @@ test_0j() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -u \\\#$UID $file; then
         error "setattr of UID succeeded unexpectedly"
     fi
@@ -271,7 +271,7 @@ test_0k() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -g \\\#$UID $file; then
         error "setattr of GID succeeded unexpectedly"
     fi
@@ -307,7 +307,7 @@ test_0m() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -p 0644 $file; then
         error "setattr of permission succeeded unexpectedly"
     fi
@@ -357,7 +357,7 @@ test_0o() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     checkattr $CLIENT1 i $file
     rc=$?
     do_node $CLIENT1 chattr -i $file
@@ -428,7 +428,7 @@ test_0r() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT || error "$CLIENT1 evicted"
+    client_up $CLIENT1 || error "$CLIENT1 evicted"
     if (($mtime_pre >= $mtime_post)); then
         error "time not changed: pre $mtime_pre, post $mtime_post"
     fi
@@ -478,7 +478,7 @@ test_0t() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
         error "link should fail"
     fi
@@ -499,7 +499,7 @@ test_0u() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if ! do_node $CLIENT1 $CHECKSTAT -a $DIR/$tdir/$tfile; then
         error "link should fail"
     fi
@@ -556,7 +556,7 @@ test_0x() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tfile; then
         error "rename should fail"
     fi
@@ -577,7 +577,7 @@ test_0y() {
     zconf_umount $CLIENT2 $MOUNT
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1 not evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1 not evicted"
     if do_node $CLIENT1 $CHECKSTAT -a $DIR/$tfile; then
         error "rename should fail"
     fi
@@ -601,7 +601,7 @@ test_1a() {
 
     facet_failover $SINGLEMDS
     # recovery shouldn't fail due to missing client 2
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # All 50 files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
@@ -630,7 +630,7 @@ test_2a() {
 
     facet_failover $SINGLEMDS
     # recovery shouldn't fail due to missing client 2
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # All 50 files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
@@ -687,8 +687,8 @@ test_2b() {
     zconf_umount $CLIENT2 $MOUNT2
     facet_failover $SINGLEMDS
 
-    do_node $CLIENT1 df $MOUNT && error "$CLIENT1:$MOUNT not evicted"
-    do_node $CLIENT2 df $MOUNT1 || error "$CLIENT2:$MOUNT1 evicted"
+    client_evicted $CLIENT1 || error "$CLIENT1:$MOUNT not evicted"
+    client_up $CLIENT2 || error "$CLIENT2:$MOUNT1 evicted"
 
     #
     # Check the MDT epoch.  $post must be the first transaction
@@ -738,7 +738,7 @@ test_3a() {
 
     facet_failover $SINGLEMDS
     # recovery shouldn't fail due to missing client 2
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
     do_node $CLIENT1 $CHECKSTAT $DIR/$tfile && return 2
 
     zconf_mount $CLIENT2 $DIR || error "mount $CLIENT2 $DIR fail"
@@ -770,7 +770,7 @@ test_3b() {
 
     facet_failover $SINGLEMDS
     # recovery should fail due to missing client 2
-    do_node $CLIENT1 df $DIR && return 1
+    client_evicted $CLIENT1 || return 1
 
     do_node $CLIENT1 $CHECKSTAT -p 755 $DIR/$tfile && return 2
     zconf_mount $CLIENT2 $DIR || error "mount $CLIENT2 $DIR fail"
@@ -817,14 +817,14 @@ test_4a() {
     vbr_deactivate_client $CLIENT2
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # All 50 files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
     do_node $CLIENT1 unlinkmany $DIR/$tfile-3- 25 || return 3
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 4
+    client_up $CLIENT2 || return 4
     # All 25 files from client2 should have been replayed
     do_node $CLIENT2 unlinkmany $DIR/$tdir/$tfile-2- 25 || return 5
 
@@ -848,13 +848,13 @@ test_4b(){
     vbr_deactivate_client $CLIENT2
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # create another set of files
     do_node $CLIENT1 createmany -o $DIR/$tfile-3- 25
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 2
+    client_up $CLIENT2 || return 2
 
     # All files from should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 3
@@ -880,13 +880,13 @@ test_4c() {
     vbr_deactivate_client $CLIENT2
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # create another set of files
     do_node $CLIENT1 createmany -m $DIR/$tfile-3- 25
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 2
+    client_up $CLIENT2 || return 2
 
     # All files from should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 3
@@ -913,10 +913,10 @@ test_5a() {
     vbr_deactivate_client $CLIENT2
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR && return 1
+    client_evicted $CLIENT1 || return 1
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 2
+    client_up $CLIENT2 || return 2
 
     # First 25 files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 3
@@ -944,14 +944,14 @@ test_5b() {
     vbr_deactivate_client $CLIENT2
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
     do_node $CLIENT1 $CHECKSTAT $DIR/$tfile-2-0 && error "$tfile-2-0 exists"
 
     # create another set of files
     do_node $CLIENT1 createmany -o $DIR/$tfile-3- 25
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR && return 4
+    client_evicted $CLIENT2 || return 4
     # file from client2 should fail
     do_node $CLIENT2 $CHECKSTAT $DIR/$tfile-2-0 && error "$tfile-2-0 exists"
 
@@ -984,13 +984,13 @@ test_6a() {
     do_node $CLIENT2 "sysctl -w lustre.fail_val=5"
 #define OBD_FAIL_PTLRPC_REPLAY        0x50e
     do_node $CLIENT2 "sysctl -w lustre.fail_loc=0x2000050e"
-    do_node $CLIENT2 df $DIR
+    client_up $CLIENT2
     # vbr_activate_client $CLIENT2
     # need way to know that client stops replays
     sleep 5
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # All files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
@@ -1020,10 +1020,10 @@ test_7a() {
 
     facet_failover $SINGLEMDS
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 4
+    client_up $CLIENT2 || return 4
 
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 1
+    client_up $CLIENT1 || return 1
 
     # All files should have been replayed
     do_node $CLIENT1 unlinkmany $DIR/$tfile- 25 || return 2
@@ -1051,10 +1051,10 @@ test_8a() {
 
     vbr_deactivate_client $CLIENT2
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 3
+    client_up $CLIENT1 || return 3
     #client1 is back and will try to open orphan
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 4
+    client_up $CLIENT2 || return 4
 
     do_node $CLIENT2 $CHECKSTAT $DIR/$tfile && error "$tfile exists"
     zconf_umount_clients $CLIENTS $DIR
@@ -1077,10 +1077,10 @@ test_8b() {
 
     vbr_deactivate_client $CLIENT2
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 2
+    client_up $CLIENT1 || return 2
     #client1 is back and will try to open orphan
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 3
+    client_up $CLIENT2 || return 3
 
     rmultiop_stop $CLIENT2 || return 1
     do_node $CLIENT2 $CHECKSTAT $DIR/$tfile && error "$tfile exists"
@@ -1105,10 +1105,10 @@ test_8c() {
 
     vbr_deactivate_client $CLIENT2
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 3
+    client_up $CLIENT1 || return 3
     #client1 is back and will try to open orphan
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 4
+    client_up $CLIENT2 || return 4
 
     do_node $CLIENT2 $CHECKSTAT $DIR/$tfile && error "$tfile exists"
     zconf_umount_clients $CLIENTS $DIR
@@ -1134,11 +1134,11 @@ test_8d() {
 
     vbr_deactivate_client $CLIENT2
     facet_failover $SINGLEMDS
-    do_node $CLIENT1 df $DIR || return 6
+    client_up $CLIENT1 || return 6
 
     #client1 is back and will try to open orphan
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 8
+    client_up $CLIENT2 || return 8
 
     do_node $CLIENT2 $CHECKSTAT $DIR/$tfile && error "$tfile exists"
     zconf_umount_clients $CLIENTS $DIR
@@ -1160,7 +1160,7 @@ test_8e() {
 
     zconf_umount $CLIENT1 $DIR
     facet_failover $SINGLEMDS
-    do_node $CLIENT2 df $DIR || return 6
+    client_up $CLIENT2 || return 6
 
     do_node $CLIENT2 rm $DIR/$tfile || error "$tfile doesn't exists"
     zconf_umount_clients $CLIENTS $DIR
@@ -1182,7 +1182,7 @@ test_8f() {
 
     zconf_umount $CLIENT1 $DIR
     facet_failover $SINGLEMDS
-    do_node $CLIENT2 df $DIR || return 6
+    client_up $CLIENT2 || return 6
 
     do_node $CLIENT2 rm $DIR/$tfile || error "$tfile doesn't exists"
     zconf_umount $CLIENT2 $DIR
@@ -1204,7 +1204,7 @@ test_8g() {
 
     zconf_umount $CLIENT1 $DIR
     facet_failover $SINGLEMDS
-    do_node $CLIENT2 df $DIR || return 6
+    client_up $CLIENT2 || return 6
 
     do_node $CLIENT2 rmdir $DIR/$tfile || error "$tfile doesn't exists"
     zconf_umount $CLIENT2 $DIR
@@ -1241,7 +1241,7 @@ test_10 () {
     sleep $TIMEOUT
 
     vbr_activate_client $CLIENT2
-    do_node $CLIENT2 df $DIR || return 4
+    client_up $CLIENT2 || return 4
 
     for CLIENT in ${CLIENTS//,/ }; do
         PID=`cat pid.$CLIENT`
index 2005b0b..367356a 100755 (executable)
@@ -18,10 +18,9 @@ cmpcheck
 
 export OSTCOUNT=2
 #export LOV="27c 27d 27e 27f 27g 27j 27k 27l 27m 27s 27t 27w 34f 51d 56 56g 56h"
-#export JOIN="75a 75b 57c 75d 75e 75f 75g"
 #export CHKSUM="77a 77d 77e 77f"
 #export DIO="69 77d 77e 77f 78 119a 119b 119c"
-#export EXCEPT="69 78 118a 129 $JOIN $CHKSUM $DIO"
+#export EXCEPT="69 78 118a 129 $CHKSUM $DIO"
 #export EXCEPT="77f"
 export SLOW="yes"
 
index 2219e4b..95c3564 100644 (file)
@@ -338,8 +338,10 @@ test_1_sub() {
        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) || quota_error g $TSTUSR "(grp) write failure, but expect success"
         etime=`date +%s`
         delta=$((etime - stime))
-        rate=$((BLK_SZ * LIMIT / 2 / delta / 1024))
-        [ $rate -gt 1024 ] || error "SLOW IO for $TSTUSR (group): $rate KB/sec"
+        if [ $delta -gt 0 ]; then
+               rate=$((BLK_SZ * LIMIT / 2 / delta / 1024))
+               [ $rate -gt 1024 ] || error "SLOW IO for $TSTUSR (group): $rate KB/sec"
+       fi
         log "    Done"
         log "    Write out of block quota ..."
        # this time maybe cache write, ignore it's failure
index 64d5010..184a336 100644 (file)
@@ -9,8 +9,8 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 10764 16260
-ALWAYS_EXCEPT="                27u   42a  42b  42c  42d  45   51d   65a   65e   68b   75    119d   $SANITY_EXCEPT"
+# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 16260 19742 
+ALWAYS_EXCEPT="                27u   42a  42b  42c  42d  45   51d   65a   65e   68b  119d  130 $SANITY_EXCEPT"
 # bug number for skipped test: 2108 9789 3637 9789 3561 5188/5749 1443
 #ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"}
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
@@ -32,7 +32,8 @@ ALWAYS_EXCEPT="$ALWAYS_EXCEPT 76"
 # 156 -- ^^
 # 160 -- changelogs don't work yet
 # 162 -- DMU's osd_object_create() doesn't set XATTR_NAME_LMA
-ALWAYS_EXCEPT="$ALWAYS_EXCEPT 52a 52b 57a 57b 129 132 156 160"
+# 180 -- ofd doesn't work with obdecho 
+ALWAYS_EXCEPT="$ALWAYS_EXCEPT 52a 52b 57a 57b 129 132 156 160 180"
 
 case `uname -r` in
 2.4*) FSTYPE=${FSTYPE:-ext3} ;;
@@ -1002,19 +1003,22 @@ sleep_maxage() {
 # OSCs keep a NOSPC flag that will be reset after ~5s (qos_maxage)
 # if the OST isn't full anymore.
 reset_enospc() {
-       local FAIL_LOC=${1:-0}
-       local OSTIDX=${2:-""}
+       local OSTIDX=${1:-""}
 
        local list=$(comma_list $(osts_nodes))
        [ "$OSTIDX" ] && list=$(facet_host ost$((OSTIDX + 1)))
 
-       do_nodes $list lctl set_param fail_loc=$FAIL_LOC
+       do_nodes $list lctl set_param fail_loc=0
        sleep_maxage
 }
 
 exhaust_precreations() {
        local OSTIDX=$1
-       local MDSIDX=$(get_mds_dir "$DIR/d27")
+       local FAILLOC=$2
+       local FAILIDX=${3:-$OSTIDX}
+
+       mkdir -p $DIR/$tdir
+       local MDSIDX=$(get_mds_dir "$DIR/$tdir")
        echo OSTIDX=$OSTIDX MDSIDX=$MDSIDX
 
        local OST=$(lfs osts | grep ${OSTIDX}": " | \
@@ -1029,21 +1033,22 @@ exhaust_precreations() {
        do_facet mds${MDSIDX} lctl get_param osc.*OST*-osc-${MDT_INDEX}.prealloc*
 
        mkdir -p $DIR/d27/${OST}
-       $SETSTRIPE $DIR/d27/${OST} -i $OSTIDX -c 1
+       $SETSTRIPE $DIR/$tdir/${OST} -i $OSTIDX -c 1
 #define OBD_FAIL_OST_ENOSPC              0x215
+       do_facet ost$((OSTIDX + 1)) lctl set_param fail_val=$FAILIDX
        do_facet ost$((OSTIDX + 1)) lctl set_param fail_loc=0x215
        echo "Creating to objid $last_id on ost $OST..."
-       createmany -o $DIR/d27/${OST}/f $next_id $((last_id - next_id + 2))
+       createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
        do_facet mds${MDSIDX} lctl get_param osc.*OST*-osc-${MDT_INDEX}.prealloc*
-       reset_enospc $2 $OSTIDX
+       do_facet ost$((OSTIDX + 1)) lctl set_param fail_loc=$FAILLOC
+       sleep_maxage
 }
 
 exhaust_all_precreations() {
        local i
        for (( i=0; i < OSTCOUNT; i++ )) ; do
-               exhaust_precreations $i 0x215
+               exhaust_precreations $i $1 -1
        done
-       reset_enospc $1
 }
 
 test_27n() {
@@ -1052,12 +1057,11 @@ test_27n() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
        reset_enospc
-       rm -f $DIR/d27/f27n
-       $SETSTRIPE $DIR/d27 -c 1 -i -1
+       rm -f $DIR/$tdir/$tfile
        exhaust_precreations 0 0x80000215
-       $SETSTRIPE -c -1 $DIR/d27
-       touch $DIR/d27/f27n || error
-       $GETSTRIPE $DIR/d27/f27n
+       $SETSTRIPE -c -1 $DIR/$tdir
+       touch $DIR/$tdir/$tfile || error
+       $GETSTRIPE $DIR/$tdir/$tfile
        reset_enospc
 }
 run_test 27n "create file with some full OSTs =================="
@@ -1068,13 +1072,13 @@ test_27o() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
        reset_enospc
-       rm -f $DIR/d27/f27o
+       rm -f $DIR/$tdir/$tfile
        exhaust_all_precreations 0x215
 
-       touch $DIR/d27/f27o && error "able to create $DIR/d27/f27o"
+       touch $DIR/$tdir/$tfile && error "able to create $DIR/$tdir/$tfile"
 
        reset_enospc
-       rm -rf $DIR/d27/*
+       rm -rf $DIR/$tdir/*
 }
 run_test 27o "create file with all full OSTs (should error) ===="
 
@@ -1084,17 +1088,17 @@ test_27p() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
        reset_enospc
-       rm -f $DIR/d27/f27p
-       mkdir -p $DIR/d27
+       rm -f $DIR/$tdir/$tfile
+       mkdir -p $DIR/$tdir
 
-       $MCREATE $DIR/d27/f27p || error "mcreate failed"
-       $TRUNCATE $DIR/d27/f27p 80000000 || error "truncate failed"
-       $CHECKSTAT -s 80000000 $DIR/d27/f27p || error "checkstat failed"
+       $MCREATE $DIR/$tdir/$tfile || error "mcreate failed"
+       $TRUNCATE $DIR/$tdir/$tfile 80000000 || error "truncate failed"
+       $CHECKSTAT -s 80000000 $DIR/$tdir/$tfile || error "checkstat failed"
 
        exhaust_precreations 0 0x80000215
-       echo foo >> $DIR/d27/f27p || error "append failed"
-       $CHECKSTAT -s 80000004 $DIR/d27/f27p || error "checkstat failed"
-       $LFS getstripe $DIR/d27/f27p
+       echo foo >> $DIR/$tdir/$tfile || error "append failed"
+       $CHECKSTAT -s 80000004 $DIR/$tdir/$tfile || error "checkstat failed"
+       $LFS getstripe $DIR/$tdir/$tfile
 
        reset_enospc
 }
@@ -1106,16 +1110,16 @@ test_27q() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
        reset_enospc
-       rm -f $DIR/d27/f27q
+       rm -f $DIR/$tdir/$tfile
 
-       $MCREATE $DIR/d27/f27q || error "mcreate $DIR/d27/f27q failed"
-       $TRUNCATE $DIR/d27/f27q 80000000 ||error "truncate $DIR/d27/f27q failed"
-       $CHECKSTAT -s 80000000 $DIR/d27/f27q || error "checkstat failed"
+       $MCREATE $DIR/$tdir/$tfile || error "mcreate $DIR/$tdir/$tfile failed"
+       $TRUNCATE $DIR/$tdir/$tfile 80000000 ||error "truncate $DIR/$tdir/$tfile failed"
+       $CHECKSTAT -s 80000000 $DIR/$tdir/$tfile || error "checkstat failed"
 
        exhaust_all_precreations 0x215
 
-       echo foo >> $DIR/d27/f27q && error "append succeeded"
-       $CHECKSTAT -s 80000000 $DIR/d27/f27q || error "checkstat 2 failed"
+       echo foo >> $DIR/$tdir/$tfile && error "append succeeded"
+       $CHECKSTAT -s 80000000 $DIR/$tdir/$tfile || error "checkstat 2 failed"
 
        reset_enospc
 }
@@ -1127,10 +1131,10 @@ test_27r() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
        reset_enospc
-       rm -f $DIR/d27/f27r
+       rm -f $DIR/$tdir/$tfile
        exhaust_precreations 0 0x80000215
 
-       $SETSTRIPE $DIR/d27/f27r -i 0 -c 2 # && error
+       $SETSTRIPE $DIR/$tdir/$tfile -i 0 -c 2 # && error
 
        reset_enospc
 }
@@ -1163,14 +1167,14 @@ test_27u() { # bug 4900
 
 #define OBD_FAIL_MDS_OSC_PRECREATE      0x139
         do_facet $SINGLEMDS lctl set_param fail_loc=0x139
-        mkdir -p $DIR/d27u
-        createmany -o $DIR/d27u/t- 1000
+        mkdir -p $DIR/$tdir
+        createmany -o $DIR/$tdir/t- 1000
         do_facet $SINGLEMDS lctl set_param fail_loc=0
 
         TLOG=$DIR/$tfile.getstripe
-        $GETSTRIPE $DIR/d27u > $TLOG
+        $GETSTRIPE $DIR/$tdir > $TLOG
         OBJS=`awk -vobj=0 '($1 == 0) { obj += 1 } END { print obj;}' $TLOG`
-        unlinkmany $DIR/d27u/t- 1000
+        unlinkmany $DIR/$tdir/t- 1000
         [ $OBJS -gt 0 ] && \
                 error "$OBJS objects created on OST-0.  See $TLOG" || pass
 }
@@ -1181,7 +1185,8 @@ test_27v() { # bug 4900
        remote_mds_nodsh && skip "remote MDS with nodsh" && return
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
-        exhaust_all_precreations
+        exhaust_all_precreations 0x215
+        reset_enospc
 
         mkdir -p $DIR/$tdir
         $SETSTRIPE $DIR/$tdir -c 1         # 1 stripe / file
@@ -1205,17 +1210,17 @@ test_27v() { # bug 4900
 run_test 27v "skip object creation on slow OST ================="
 
 test_27w() { # bug 10997
-        mkdir -p $DIR/d27w || error "mkdir failed"
-        $LSTRIPE $DIR/d27w/f0 -s 65536 || error "lstripe failed"
-        size=`$GETSTRIPE $DIR/d27w/f0 -qs | head -n 1`
+        mkdir -p $DIR/$tdir || error "mkdir failed"
+        $LSTRIPE $DIR/$tdir/f0 -s 65536 || error "lstripe failed"
+        size=`$GETSTRIPE $DIR/$tdir/f0 -s`
         [ $size -ne 65536 ] && error "stripe size $size != 65536" || true
 
         [ "$OSTCOUNT" -lt "2" ] && skip_env "skipping multiple stripe count/offset test" && return
         for i in `seq 1 $OSTCOUNT`; do
                 offset=$(($i-1))
-                $LSTRIPE $DIR/d27w/f$i -c $i -i $offset || error "lstripe -c $i -i $offset failed"
-                count=`$GETSTRIPE -qc $DIR/d27w/f$i | head -n 1`
-                index=`$GETSTRIPE -qo $DIR/d27w/f$i | head -n 1`
+                $LSTRIPE $DIR/$tdir/f$i -c $i -i $offset || error "lstripe -c $i -i $offset failed"
+                count=`$GETSTRIPE -c $DIR/$tdir/f$i`
+                index=`$GETSTRIPE -o $DIR/$tdir/f$i`
                 [ $count -ne $i ] && error "stripe count $count != $i" || true
                 [ $index -ne $offset ] && error "stripe offset $index != $offset" || true
         done
@@ -1224,20 +1229,20 @@ run_test 27w "check lfs setstripe -c -s -i options ============="
 
 test_27x() {
        [ "$OSTCOUNT" -lt "2" ] && skip_env "$OSTCOUNT < 2 OSTs" && return
-       OFFSET=$(($OSTCOUNTi - 1))
+       OFFSET=$(($OSTCOUNT - 1))
        OSTIDX=0
        local OST=$(lfs osts | awk '/'${OSTIDX}': / { print $2 }' | sed -e 's/_UUID$//')
 
        mkdir -p $DIR/$tdir
        $SETSTRIPE $DIR/$tdir -c 1      # 1 stripe per file
-       do_facet ost$OSTIDX lctl set_param -n obdfilter.$OST.degraded 1
+       do_facet ost$((OSTIDX + 1)) lctl set_param -n obdfilter.$OST.degraded 1
        sleep_maxage
        createmany -o $DIR/$tdir/$tfile $OSTCOUNT
        for i in `seq 0 $OFFSET`; do
                [ `$GETSTRIPE $DIR/$tdir/$tfile$i | grep -A 10 obdidx | awk '{print $1}' | grep -w "$OSTIDX"` ] &&
                error "OST0 was degraded but new created file still use it"
        done
-       do_facet ost$OSTIDX lctl set_param -n obdfilter.$OST.degraded 0
+       do_facet ost$((OSTIDX + 1)) lctl set_param -n obdfilter.$OST.degraded 0
 }
 run_test 27x "create files while OST0 is degraded"
 
@@ -2658,12 +2663,14 @@ test_56a() {    # was test_56
 
         [  "$OSTCOUNT" -lt 2 ] && \
                 skip_env "skipping other lfs getstripe --obd test" && return
-        FILENUM=`$GETSTRIPE --recursive $DIR/d56 | sed -n '/^[  ]*1[    ]/p' | wc -l`
-        OBDUUID=`$GETSTRIPE --recursive $DIR/d56 | sed -n '/^[  ]*1:/p' | awk '{print $2}'`
-        FOUND=`$GETSTRIPE -r --obd $OBDUUID $DIR/d56 | wc -l`
+        OSTIDX=1
+        OBDUUID=$(lfs osts | grep ${OSTIDX}": " | awk '{print $2}')
+        FILENUM=`$GETSTRIPE -ir $DIR/d56 | grep -x $OSTIDX | wc -l`
+        FOUND=`$GETSTRIPE -r --obd $OBDUUID $DIR/d56 | grep obdidx | wc -l`
         [ $FOUND -eq $FILENUM ] || \
                 error "lfs getstripe --obd wrong: found $FOUND, expected $FILENUM"
-        [ `$GETSTRIPE -r -v --obd $OBDUUID $DIR/d56 | sed '/^[  ]*1[    ]/d' |\
+        [ `$GETSTRIPE -r -v --obd $OBDUUID $DIR/d56 | \
+                sed '/^[        ]*'${OSTIDX}'[  ]/d' |\
                 sed -n '/^[     ]*[0-9][0-9]*[  ]/p' | wc -l` -eq 0 ] || \
                 error "lfs getstripe --obd wrong: should not show file on other obd"
         echo "lfs getstripe --obd passed."
@@ -2743,7 +2750,7 @@ run_test 56h "check lfs find ! -name ============================="
 test_56i() {
        tdir=${tdir}i
        mkdir -p $DIR/$tdir
-       UUID=`$GETSTRIPE $DIR/$tdir | awk '/0: / { print $2 }'`
+       UUID=`$LFS osts | awk '/0: / { print $2 }'`
        OUT="`$LFIND -ost $UUID $DIR/$tdir`"
        [ "$OUT" ] && error "$LFIND returned directory '$OUT'" || true
 }
@@ -3437,113 +3444,6 @@ test_74b() { # bug 13310
 }
 run_test 74b "ldlm_enqueue freed-export error path, touch (shouldn't LBUG)"
 
-JOIN=${JOIN:-"lfs join"}
-F75=$DIR/f75
-F128k=${F75}_128k
-FHEAD=${F75}_head
-FTAIL=${F75}_tail
-export T75_PREP=no
-test75_prep() {
-        [ $T75_PREP = "yes" ] && return
-        echo "using F75=$F75, F128k=$F128k, FHEAD=$FHEAD, FTAIL=$FTAIL"
-
-        dd if=/dev/urandom of=${F75}_128k bs=128k count=1 || error "dd failed"
-        log "finished dd"
-        chmod 777 ${F128k}
-        T75_PREP=yes
-}
-
-test_75a() {
-        test75_prep
-
-        cp -p ${F128k} ${FHEAD}
-        log "finished cp to $FHEAD"
-        cp -p ${F128k} ${FTAIL}
-        log "finished cp to $FTAIL"
-        cat ${F128k} ${F128k} > ${F75}_sim_sim
-
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        log "finished join $FHEAD to ${F75}_sim_sim"
-        cmp ${FHEAD} ${F75}_sim_sim || error "${FHEAD} ${F75}_sim_sim differ"
-        log "finished cmp $FHEAD to ${F75}_sim_sim"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} still exist after join"
-}
-run_test 75a "TEST join file ===================================="
-
-test_75b() {
-        test75_prep
-
-        cp -p ${F128k} ${FTAIL}
-        cat ${F75}_sim_sim >> ${F75}_join_sim
-        cat ${F128k} >> ${F75}_join_sim
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        cmp ${FHEAD} ${F75}_join_sim || \
-                error "${FHEAD} ${F75}_join_sim are different"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join"
-}
-run_test 75b "TEST join file 2 =================================="
-
-test_75c() {
-        test75_prep
-
-        cp -p ${F128k} ${FTAIL}
-        cat ${F128k} >> ${F75}_sim_join
-        cat ${F75}_join_sim >> ${F75}_sim_join
-        $JOIN ${FTAIL} ${FHEAD} || error "join error"
-        cmp ${FTAIL} ${F75}_sim_join || \
-                error "${FTAIL} ${F75}_sim_join are different"
-        $CHECKSTAT -a ${FHEAD} || error "tail ${FHEAD} exist after join"
-}
-run_test 75c "TEST join file 3 =================================="
-
-test_75d() {
-        test75_prep
-
-        cp -p ${F128k} ${FHEAD}
-        cp -p ${F128k} ${FHEAD}_tmp
-        cat ${F75}_sim_sim >> ${F75}_join_join
-        cat ${F75}_sim_join >> ${F75}_join_join
-        $JOIN ${FHEAD} ${FHEAD}_tmp || error "join ${FHEAD} ${FHEAD}_tmp error"
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        cmp ${FHEAD} ${F75}_join_join ||error "${FHEAD} ${F75}_join_join differ"        $CHECKSTAT -a ${FHEAD}_tmp || error "${FHEAD}_tmp exist after join"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join (2)"
-}
-run_test 75d "TEST join file 4 =================================="
-
-test_75e() {
-        test75_prep
-
-        rm -rf ${FHEAD} || "delete join file error"
-}
-run_test 75e "TEST join file 5 (remove joined file) ============="
-
-test_75f() {
-        test75_prep
-
-        cp -p ${F128k} ${F75}_join_10_compare
-        cp -p ${F128k} ${F75}_join_10
-        for ((i = 0; i < 10; i++)); do
-                cat ${F128k} >> ${F75}_join_10_compare
-                cp -p ${F128k} ${FTAIL}
-                $JOIN ${F75}_join_10 ${FTAIL} || \
-                        error "join ${F75}_join_10 ${FTAIL} error"
-                $CHECKSTAT -a ${FTAIL} || error "tail file exist after join"
-        done
-        cmp ${F75}_join_10 ${F75}_join_10_compare || \
-                error "files ${F75}_join_10 ${F75}_join_10_compare differ"
-}
-run_test 75f "TEST join file 6 (join 10 files) =================="
-
-test_75g() {
-        [ ! -f ${F75}_join_10 ] && echo "${F75}_join_10 missing" && return
-        $LFS getstripe ${F75}_join_10
-
-        $OPENUNLINK ${F75}_join_10 ${F75}_join_10 || error "files unlink open"
-
-        ls -l $F75*
-}
-run_test 75g "TEST join file 7 (open unlink) ===================="
-
 num_inodes() {
        awk '/lustre_inode_cache/ {print $2; exit}' /proc/slabinfo
 }
@@ -6099,6 +5999,7 @@ test_150() {
         cancel_lru_locks osc
         cmp $TF $DIR/$tfile || error "$TMP/$tfile $DIR/$tfile differ"
         remount_client $MOUNT
+        df -P $MOUNT
         cmp $TF $DIR/$tfile || error "$TF $DIR/$tfile differ (remount)"
 
         $TRUNCATE $TF 6000
@@ -6697,6 +6598,86 @@ test_170() {
 }
 run_test 170 "test lctl df to handle corrupted log ====================="
 
+test_171() { # bug20592
+#define OBD_FAIL_PTLRPC_DUMP_LOG         0x50e
+        $LCTL set_param fail_loc=0x50e
+        $LCTL set_param fail_val=3000
+        multiop_bg_pause $DIR/$tfile Os || true
+        # cause log dump
+        sleep 3
+        if dmesg | grep "recursive fault"; then
+                error "caught a recursive fault"
+        fi
+        $LCTL set_param fail_loc=0
+        true
+}
+run_test 171 "test libcfs_debug_dumplog_thread stuck in do_exit() ======"
+
+# it would be good to share it with obdfilter-survey/libecho code
+setup_obdecho_osc () {
+        local rc=0
+        local ost_nid=$1
+        local obdfilter_name=$2
+        [ $rc -eq 0 ] && { $LCTL attach osc ${obdfilter_name}_osc     \
+                           ${obdfilter_name}_osc_UUID || rc=2; }
+        [ $rc -eq 0 ] && { $LCTL --device ${obdfilter_name}_osc setup \
+                           ${obdfilter_name}_UUID  $ost_nid || rc=3; }
+        return $rc
+}
+
+cleaup_obdecho_osc () {
+        local obdfilter_name=$1
+        $LCTL --device ${obdfilter_name}_osc cleanup >/dev/null
+        $LCTL --device ${obdfilter_name}_osc detach  >/dev/null
+        return 0
+}
+
+obdecho_create_test() {
+        local OBD=$1
+        local node=$2
+        local rc=0
+        do_facet $node "$LCTL attach echo_client ec ec_uuid" || rc=1
+        [ $rc -eq 0 ] && { do_facet $node "$LCTL --device ec setup $OBD" ||    \
+                           rc=2; }
+        [ $rc -eq 0 ] && { do_facet $node "$LCTL --device ec create 1" ||      \
+                           rc=3; }
+        [ $rc -eq 0 ] && { do_facet $node "$LCTL --device ec test_brw 0 w 1" ||\
+                           rc=4; }
+        [ $rc -eq 0 -o $rc -gt 2 ] && { do_facet $node "$LCTL --device ec "    \
+                                        "cleanup" || rc=5; }
+        [ $rc -eq 0 -o $rc -gt 1 ] && { do_facet $node "$LCTL --device ec "    \
+                                        "detach" || rc=6; }
+        return $rc
+}
+
+test_180() {
+        local rc=0
+        local rmmod_local=0
+        local rmmod_remote=0
+
+        lsmod | grep -q obdecho || \
+                { load_module obdecho/obdecho && rmmod_local=1; }
+        OBD=$($LCTL dl | grep -v mdt | grep osc | awk '{print $4;exit}')
+        HOST=$($LCTL dl -t | grep -v mdt | grep osc | awk '{print $7;exit}')
+        OBD=`echo $OBD | sed 's/-osc-.*$//'`
+        [ "x$OBD" != "x" ] && { setup_obdecho_osc $HOST $OBD || rc=1; } || rc=1
+        [ $rc -eq 0 ] && { obdecho_create_test ${OBD}_osc client || rc=2; }
+        [ "x$OBD" != "x" ] && cleaup_obdecho_osc $OBD
+        [ $rmmod_local -eq 1 ] && rmmod obdecho
+        [ $rc -eq 0 ] || return $rc
+
+        do_facet ost "lsmod | grep -q obdecho || "                      \
+                     "{ insmod ${LUSTRE}/obdecho/obdecho.ko || "        \
+                     "modprobe obdecho; }" && rmmod_remote=1
+        OBD=$(do_facet ost $LCTL dl | awk '/obdfilter/ {print $4;exit}')
+        [ "x$OBD" != "x" ] && { obdecho_create_test $OBD ost || rc=3; }
+        [ $rmmod_remote -eq 1 ] && do_facet ost "rmmod obdecho"
+        [ $rc -eq 0 ] || return $rc
+
+        true
+}
+run_test 180 "test obdecho ============================================"
+
 # OST pools tests
 POOL=${POOL:-cea1}
 TGT_COUNT=$OSTCOUNT
@@ -6726,33 +6707,27 @@ check_file_in_pool()
        return 0
 }
 
-cleanup_200 () {
-       trap 0
-       destroy_pool $POOL
-}
+trap "cleanup_pools $FSNAME" EXIT
 
 test_200a() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
-       do_facet mgs $LCTL pool_new $FSNAME.$POOL
-
-       trap cleanup_200 EXIT
-       CLEANUP_200=yes
-
-       # get param should return err until pool is created
-       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null || echo foo" "" || error "Pool creation of $POOL failed"
-       [ $($LFS pool_list $FSNAME | grep -c $POOL) -eq 1 ] || error "$POOL not in lfs pool_list"
+    create_pool $FSNAME.$POOL || return $?
+       [ $($LFS pool_list $FSNAME | grep -c $POOL) -eq 1 ] ||
+               error "$POOL not in lfs pool_list"
 }
 run_test 200a "Create new pool =========================================="
 
 test_200b() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
-       TGT=$(for i in `seq $TGTPOOL_FIRST $TGTPOOL_STEP $TGTPOOL_MAX`; do printf "$FSNAME-OST%04x_UUID " $i; done)
+       TGT=$(for i in $TGTPOOL_LIST; do printf "$FSNAME-OST%04x_UUID " $i; done)
        do_facet mgs $LCTL pool_add $FSNAME.$POOL \
                $FSNAME-OST[$TGTPOOL_FIRST-$TGTPOOL_MAX/$TGTPOOL_STEP]
-       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | sort -u | tr '\n' ' ' " "$TGT" || error "Add to pool failed"
+       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | sort -u | tr '\n' ' ' " "$TGT" ||
+               error "Add to pool failed"
        local lfscount=$($LFS pool_list $FSNAME.$POOL | grep -c "\-OST")
        local addcount=$((($TGTPOOL_MAX - $TGTPOOL_FIRST) / $TGTPOOL_STEP + 1))
-       [ $lfscount -eq $addcount ] || error "lfs pool_list bad ost count $lfscount != $addcount"
+       [ $lfscount -eq $addcount ] ||
+               error "lfs pool_list bad ost count $lfscount != $addcount"
 }
 run_test 200b "Add targets to a pool ===================================="
 
@@ -6807,45 +6782,61 @@ test_200f() {
 run_test 200f "Create files in a pool ==================================="
 
 test_200g() {
-        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
-        TGT=$($LCTL get_param -n lov.$FSNAME-*.pools.$POOL | head -1)
-        res=$($LFS df --pool $FSNAME.$POOL | awk '{print $1}' | grep "$FSNAME-OST ")
-        [ "$res" = "$TGT" ] || echo "Pools OSTS $TGT is not $res that lfs df reports"
+       remote_mgs_nodsh && skip "remote MGS with nodsh" && return
+       TGT=$($LCTL get_param -n lov.$FSNAME-clilov-*.pools.$POOL | tr '\n' ' ')
+       res=$($LFS df --pool $FSNAME.$POOL | awk '{print $1}' | grep "$FSNAME-OST" | tr '\n' ' ')
+       [ "$res" = "$TGT" ] || error "Pools OSTs '$TGT' is not '$res' that lfs df reports"
 }
 run_test 200g "lfs df a pool ============================================"
 
-test_201a() {  # was 200g
+test_201a() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
        TGT=$($LCTL get_param -n lov.$FSNAME-*.pools.$POOL | head -1)
        do_facet mgs $LCTL pool_remove $FSNAME.$POOL $TGT
-       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | grep $TGT" "" || error "$TGT not removed from $FSNAME.$POOL"
+       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL | grep $TGT" "" ||
+               error "$TGT not removed from $FSNAME.$POOL"
 }
 run_test 201a "Remove a target from a pool ============================="
 
-test_201b() {  # was 200h
+test_201b() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
        for TGT in $($LCTL get_param -n lov.$FSNAME-*.pools.$POOL | sort -u)
        do
                do_facet mgs $LCTL pool_remove $FSNAME.$POOL $TGT
        done
-       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL" ""\
-           || error "Pool $FSNAME.$POOL cannot be drained"
-       # striping on an empty pool should fall back to "pool of everything"
-       $SETSTRIPE -p $POOL ${POOL_FILE}/$tfile || error "failed to create file with empty pool"
+       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL" "" ||
+               error "Pool $FSNAME.$POOL cannot be drained"
+       # striping on an empty/nonexistant pool should fall back to "pool of everything"
+       touch ${POOL_DIR}/$tfile || error "failed to use fallback striping for empty pool"
+       # setstripe on an empty pool should fail
+       $SETSTRIPE -p $POOL ${POOL_FILE}/$tfile 2>/dev/null && \
+               error "expected failure when creating file with empty pool"
+       return 0
 }
 run_test 201b "Remove all targets from a pool =========================="
 
-test_201c() {  # was 200i
+test_201c() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
        do_facet mgs $LCTL pool_destroy $FSNAME.$POOL
+       
+       sleep 2                        
+    # striping on an empty/nonexistant pool should fall back to "pool of everything"
+       touch ${POOL_DIR}/$tfile || error "failed to use fallback striping for missing pool"
+       # setstripe on an empty pool should fail
+       $SETSTRIPE -p $POOL ${POOL_FILE}/$tfile 2>/dev/null && \
+               error "expected failure when creating file with missing pool"
+
        # get param should return err once pool is gone
-       wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null ||
-               echo foo" "foo" && unset CLEANUP_200 && trap 0 && return 0
+       if wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$POOL 2>/dev/null ||
+                       echo foo" "foo"; then
+               remove_pool_from_list $FSNAME.$POOL
+               return 0
+       fi
        error "Pool $FSNAME.$POOL is not destroyed"
 }
 run_test 201c "Remove a pool ============================================"
 
-[ "$CLEANUP_200" ] && cleanup_200
+cleanup_pools $FSNAME
 
 test_212() {
        size=`date +%s`
@@ -6880,100 +6871,134 @@ test_214() { # for bug 20133
 }
 run_test 214 "hash-indexed directory test - bug 20133"
 
-test_215() { # for bug 18102
-       # /proc/sys/lnet/stats should look as 11 space-separated numbers
-       cat /proc/sys/lnet/stats >$TMP/lnet_stats.out
-       sysctl lnet.stats |sed 's/^lnet.stats\ =\ //g' >$TMP/lnet_stats.sys
-       STATS_LINES_OUT=$(cat $TMP/lnet_stats.out|wc -l)
-       [ "$STATS_LINES_OUT" = 1 ] || error "/proc/sys/lnet/stats has more than 1 line: $STATS"
-       STATS_LINES_SYS=$(cat $TMP/lnet_stats.sys|wc -l)
-       [ "$STATS_LINES_SYS" = 1 ] || error "lnet.stats has more than 1 line: $STATS"
-       STATS_REG='^[0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+ [0-9]\+$'
-       grep "$STATS_REG" $TMP/lnet_stats.out || (cat $TMP/lnet_stats.out && 
-                                                 error "/proc/sys/lnet/stats misformatted")
-       grep "$STATS_REG" $TMP/lnet_stats.sys || (cat $TMP/lnet_stats.sys && 
-                                                 error "lnet.stats misformatted")
-       rm -f $TMP/lnet_stats.out $TMP/lnet_stats.sys
-
-       # /proc/sys/lnet/routes should look exactly as expected
-       cat /proc/sys/lnet/routes >$TMP/lnet_routes.out
-       sysctl lnet.routes |sed 's/^lnet.routes\ =\ //g' >$TMP/lnet_routes.sys
-       echo "Routing disabled" >$TMP/lnet_routes.expected
-       echo "net      hops   state router" >>$TMP/lnet_routes.expected
-       diff $TMP/lnet_routes.expected $TMP/lnet_routes.out ||
-               error "/proc/sys/lnet/routes does not look as expected"
-       diff $TMP/lnet_routes.expected $TMP/lnet_routes.sys ||
-               error "lnet.routes does not look as expected"
-       rm -f $TMP/lnet_routes.expected $TMP/lnet_routes.out $TMP/lnet_routes.sys
-
-       # /proc/sys/lnet/routers should look exactly as expected
-       cat /proc/sys/lnet/routers >$TMP/lnet_routers.out
-       sysctl lnet.routers |sed 's/^lnet.routers\ =\ //g' >$TMP/lnet_routers.sys
-       echo "ref  rtr_ref alive_cnt  state    last_ping router" >$TMP/lnet_routers.expected
-       diff $TMP/lnet_routers.expected $TMP/lnet_routers.out ||
-               error "/proc/sys/lnet/routers does not look as expected"
-       diff $TMP/lnet_routers.expected $TMP/lnet_routers.sys ||
-               error "lnet.routers does not look as expected"
-       rm -f $TMP/lnet_routers.expected $TMP/lnet_routers.out $TMP/lnet_routers.sys
-
-       # fisrt line of /proc/sys/lnet/peers should look exactly as expected
-       cat /proc/sys/lnet/peers >$TMP/lnet_peers.out
-       sysctl lnet.peers |sed 's/^lnet.peers\ =\ //g' >$TMP/lnet_peers.sys
-       head -1 $TMP/lnet_peers.out > $TMP/lnet_peers1.out
-       echo "nid                      refs state   max   rtr   min    tx   min queue" >$TMP/lnet_peers1.expected
-       diff $TMP/lnet_peers1.expected $TMP/lnet_peers1.out ||
-               error "first line of /proc/sys/lnet/peers does not look as expected"
-       rm -f $TMP/lnet_peers1.expected $TMP/lnet_peers1.out
-       # other lines should look as a nid followed by 1 number, a word, 6 numbers, e.g.:
-       # 0@lo                        1    NA     0     0     0     0     0 0
-       TOTAL_LINES=$(cat $TMP/lnet_peers.out |wc -l)
-       OTHER_LINES=$(($TOTAL_LINES - 1))
-       MATCHED_LINES=$(cat $TMP/lnet_peers.out |tail -$TOTAL_LINES |
-                       grep -c "^[0-9.]\+@[a-z0-9]\+ *[0-9]\+ *[a-zA-Z]\+ *[0-9]\+ *[0-9]\+ *-\?[0-9]\+ *[0-9]\+ *-\?[0-9]\+ *[0-9]\+$")
-       [ "$MATCHED_LINES" = "$OTHER_LINES" ] || (cat $TMP/lnet_peers.out && 
-                                                 error "/proc/sys/lnet/peers misformatted")
-       diff $TMP/lnet_peers.out $TMP/lnet_peers.sys ||
-               error "lnet.peers does not look as expected"
-       rm -f $TMP/lnet_peers.out $TMP/lnet_peers.sys
-
-       # /proc/sys/lnet/buffers should look exactly as expected
-       cat /proc/sys/lnet/buffers >$TMP/lnet_buffers.out
-       sysctl lnet.buffers |sed 's/^lnet.buffers\ =\ //g' >$TMP/lnet_buffers.sys
-       echo "pages count credits     min" >$TMP/lnet_buffers.expected
-       echo "    0     0       0       0" >>$TMP/lnet_buffers.expected
-       echo "    1     0       0       0" >>$TMP/lnet_buffers.expected
-       echo "  256     0       0       0" >>$TMP/lnet_buffers.expected
-       diff $TMP/lnet_buffers.expected $TMP/lnet_buffers.out ||
-               error "/proc/sys/lnet/buffers does not look as expected"
-       diff $TMP/lnet_buffers.expected $TMP/lnet_buffers.sys ||
-               error "lnet.buffers does not look as expected"
-       rm -f $TMP/lnet_buffers.expected $TMP/lnet_buffers.out $TMP/lnet_buffers.sys
-
-       # fisrt line of /proc/sys/lnet/nis should look exactly as expected
-       cat /proc/sys/lnet/nis >$TMP/lnet_nis.out
-       sysctl lnet.nis |sed 's/^lnet.nis\ =\ //g' >$TMP/lnet_nis.sys
-       head -1 $TMP/lnet_nis.out > $TMP/lnet_nis1.out
-       echo "nid                      refs peer  rtr   max    tx   min" >$TMP/lnet_nis1.expected
-       diff $TMP/lnet_nis1.expected $TMP/lnet_nis1.out ||
-               error "first line of /proc/sys/lnet/nis does not look as expected"
-       rm -f $TMP/lnet_nis1.expected $TMP/lnet_nis1.out
-       # other lines should look as a nid followed by 6 numbers, e.g.:
-       # 0@lo                        3    0    0     0     0     0
-       TOTAL_LINES=$(cat $TMP/lnet_nis.out |wc -l)
-       OTHER_LINES=$(($TOTAL_LINES - 1))
-       MATCHED_LINES=$(cat $TMP/lnet_nis.out |tail -$TOTAL_LINES |
-               grep -c "^[0-9.]\+@[a-z0-9]\+ *[0-9]\+ *[0-9]\+ *[0-9]\+ *[0-9]\+ *[0-9]\+ *[0-9]\+$")
-       [ "$MATCHED_LINES" = "$OTHER_LINES" ] || (cat $TMP/lnet_nis.out && 
-                                                 error "/proc/sys/lnet/nis misformatted")
-       diff $TMP/lnet_nis.out $TMP/lnet_nis.sys ||
-               error "lnet.nis does not look as expected"
-       rm -f $TMP/lnet_nis.out $TMP/lnet_nis.sys
+# having "abc" as 1st arg, creates $TMP/lnet_abc.out and $TMP/lnet_abc.sys
+create_lnet_proc_files() {
+       cat /proc/sys/lnet/$1 >$TMP/lnet_$1.out || error "cannot read /proc/sys/lnet/$1"
+       sysctl lnet.$1 >$TMP/lnet_$1.sys_tmp || error "cannot read lnet.$1"
+
+       sed "s/^lnet.$1\ =\ //g" "$TMP/lnet_$1.sys_tmp" >$TMP/lnet_$1.sys
+       rm -f "$TMP/lnet_$1.sys_tmp"
+}
+
+# counterpart of create_lnet_proc_files
+remove_lnet_proc_files() {
+       rm -f $TMP/lnet_$1.out $TMP/lnet_$1.sys
+}
+
+# uses 1st arg as trailing part of filename, 2nd arg as description for reports,
+# 3rd arg as regexp for body
+check_lnet_proc_stats() {
+       local l=$(cat "$TMP/lnet_$1" |wc -l)
+       [ $l = 1 ] || (cat "$TMP/lnet_$1" && error "$2 is not of 1 line: $l")
+
+       grep -E "$3" "$TMP/lnet_$1" || (cat "$TMP/lnet_$1" && error "$2 misformatted")
+}
+
+# uses 1st arg as trailing part of filename, 2nd arg as description for reports,
+# 3rd arg as regexp for body, 4th arg as regexp for 1st line, 5th arg is
+# optional and can be regexp for 2nd line (lnet.routes case)
+check_lnet_proc_entry() {
+       local blp=2            # blp stands for 'position of 1st line of body'
+       [ "$5" = "" ] || blp=3 # lnet.routes case
+
+       local l=$(cat "$TMP/lnet_$1" |wc -l)
+       # subtracting one from $blp because the body can be empty
+       [ "$l" -ge "$(($blp - 1))" ] || (cat "$TMP/lnet_$1" && error "$2 is too short: $l")
+
+       sed -n '1 p' "$TMP/lnet_$1" |grep -E "$4" >/dev/null ||
+               (cat "$TMP/lnet_$1" && error "1st line of $2 misformatted")
+
+       [ "$5" = "" ] || sed -n '2 p' "$TMP/lnet_$1" |grep -E "$5" >/dev/null ||
+               (cat "$TMP/lnet_$1" && error "2nd line of $2 misformatted")
+
+       # bail out if any unexpected line happened
+       sed -n "$blp~1 p" "$TMP/lnet_$1" |grep -Ev "$3"
+       [ "$?" != 0 ] || error "$2 misformatted"
+}
+
+test_215() { # for bugs 18102, 21079, 21517
+       local N='(0|[1-9][0-9]*)'   # non-negative numeric
+       local P='[1-9][0-9]*'       # positive numeric
+       local I='(0|-?[1-9][0-9]*)' # any numeric (0 | >0 | <0)
+       local NET='[a-z][a-z0-9]*'  # LNET net like o2ib2
+       local ADDR='[0-9.]+'        # LNET addr like 10.0.0.1
+       local NID="$ADDR@$NET"      # LNET nid like 10.0.0.1@o2ib2
+
+       local L1 # regexp for 1st line
+       local L2 # regexp for 2nd line (optional)
+       local BR # regexp for the rest (body)
+
+       # /proc/sys/lnet/stats should look as 11 space-separated non-negative numerics
+       BR="^$N $N $N $N $N $N $N $N $N $N $N$"
+       create_lnet_proc_files "stats"
+       check_lnet_proc_stats "stats.out" "/proc/sys/lnet/stats" "$BR"
+       check_lnet_proc_stats "stats.sys" "lnet.stats" "$BR"
+       remove_lnet_proc_files "stats"
+
+       # /proc/sys/lnet/routes should look like this:
+       # Routing disabled/enabled
+       # net hops state router
+       # where net is a string like tcp0, hops >= 0, state is up/down,
+       # router is a string like 192.168.1.1@tcp2
+       L1="^Routing (disabled|enabled)$"
+       L2="^net +hops +state +router$"
+       BR="^$NET +$N +(up|down) +$NID$"
+       create_lnet_proc_files "routes"
+       check_lnet_proc_entry "routes.out" "/proc/sys/lnet/routes" "$BR" "$L1" "$L2"
+       check_lnet_proc_entry "routes.sys" "lnet.routes" "$BR" "$L1" "$L2"
+       remove_lnet_proc_files "routes"
+
+       # /proc/sys/lnet/routers should look like this:
+       # ref rtr_ref alive_cnt state last_ping ping_sent deadline down_ni router
+       # where ref > 0, rtr_ref > 0, alive_cnt >= 0, state is up/down,
+       # last_ping >= 0, ping_sent is boolean (0/1), deadline and down_ni are
+       # numeric (0 or >0 or <0), router is a string like 192.168.1.1@tcp2
+       L1="^ref +rtr_ref +alive_cnt +state +last_ping +ping_sent +deadline +down_ni +router$"
+       BR="^$P +$P +$N +(up|down) +$N +(0|1) +$I +$I +$NID$"
+       create_lnet_proc_files "routers"
+       check_lnet_proc_entry "routers.out" "/proc/sys/lnet/routers" "$BR" "$L1"
+       check_lnet_proc_entry "routers.sys" "lnet.routers" "$BR" "$L1"
+       remove_lnet_proc_files "routers"
+
+       # /proc/sys/lnet/peers should look like this:
+       # nid refs state max rtr min tx min queue
+       # where nid is a string like 192.168.1.1@tcp2, refs > 0,
+       # state is up/down/NA, max >= 0. rtr, min, tx, min are 
+       # numeric (0 or >0 or <0), queue >= 0.
+       L1="^nid +refs +state +max +rtr +min +tx +min +queue$"
+       BR="^$NID +$P +(up|down|NA) +$N +$I +$I +$I +$I +$N$"
+       create_lnet_proc_files "peers"
+       check_lnet_proc_entry "peers.out" "/proc/sys/lnet/peers" "$BR" "$L1"
+       check_lnet_proc_entry "peers.sys" "lnet.peers" "$BR" "$L1"
+       remove_lnet_proc_files "peers"
+
+       # /proc/sys/lnet/buffers  should look like this:
+       # pages count credits min
+       # where pages >=0, count >=0, credits and min are numeric (0 or >0 or <0)
+       L1="^pages +count +credits +min$"
+       BR="^ +$N +$N +$I +$I$"
+       create_lnet_proc_files "buffers"
+       check_lnet_proc_entry "buffers.out" "/proc/sys/lnet/buffers" "$BR" "$L1"
+       check_lnet_proc_entry "buffers.sys" "lnet.buffers" "$BR" "$L1"
+       remove_lnet_proc_files "buffers"
+
+       # /proc/sys/lnet/nis should look like this:
+       # nid status alive refs peer rtr max tx min
+       # where nid is a string like 192.168.1.1@tcp2, status is up/down,
+       # alive is numeric (0 or >0 or <0), refs > 0, peer >= 0,
+       # rtr >= 0, max >=0, tx and min are numeric (0 or >0 or <0).
+       L1="^nid +status +alive +refs +peer +rtr +max +tx +min$"
+       BR="^$NID +(up|down) +$I +$P +$N +$N +$N +$I +$I$"
+       create_lnet_proc_files "nis"
+       check_lnet_proc_entry "nis.out" "/proc/sys/lnet/nis" "$BR" "$L1"
+       check_lnet_proc_entry "nis.sys" "lnet.nis" "$BR" "$L1"
+       remove_lnet_proc_files "nis"
 
        # can we successfully write to /proc/sys/lnet/stats?
        echo "0" >/proc/sys/lnet/stats || error "cannot write to /proc/sys/lnet/stats"
        sysctl -w lnet.stats=0 || error "cannot write to lnet.stats"
 }
-run_test 215 "/proc/sys/lnet exists and has proper content - bug 18102"
+run_test 215 "/proc/sys/lnet exists and has proper content - bugs 18102, 21079, 21517"
 
 test_216() { # bug 20317
         local node
index f7dea03..64dfdcd 100644 (file)
@@ -13,7 +13,6 @@ grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEP
 # Tests that fail on uml
 [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
 
-# Join file feature is not supported currently.
 # It will be ported soon.
 EXCEPT="$EXCEPT 22"
 
@@ -409,26 +408,6 @@ test_21() { # Bug 5907
 }
 run_test 21 " Try to remove mountpoint on another dir ===="
 
-JOIN=${JOIN:-"lfs join"}
-
-test_22() { # Bug 9926
-       mkdir $DIR1/d21
-       dd if=/dev/urandom of=$DIR1/d21/128k bs=1024 count=128
-       cp -p $DIR1/d21/128k $DIR1/d21/f_head
-       for ((i=0;i<10;i++)); do
-               cp -p $DIR1/d21/128k $DIR1/d21/f_tail
-               $JOIN $DIR1/d21/f_head $DIR1/d21/f_tail || error "join error"
-               $CHECKSTAT -a $DIR1/d21/f_tail || error "tail file exist after join"
-       done
-       echo aaaaaaaaaaa >> $DIR1/d21/no_joined
-
-       mv $DIR2/d21/f_head $DIR2/
-       munlink $DIR2/f_head || error "unlink joined file error"
-       cat $DIR2/d21/no_joined || error "cat error"
-       rm -rf $DIR2/d21/no_joined || error "unlink normal file error"
-}
-run_test 22 " After joining in one dir,  open/close unlink file in anther dir"
-
 test_23() { # Bug 5972
        echo "others should see updated atime while another read" > $DIR1/f23
        
index 5d31c17..463221f 100644 (file)
@@ -23,6 +23,16 @@ export QUOTA_AUTO=0
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/functions.sh
 
+LUSTRE_TESTS_CFG_DIR=${LUSTRE_TESTS_CFG_DIR:-${LUSTRE}/tests/cfg}
+
+EXCEPT_LIST_FILE=${EXCEPT_LIST_FILE:-${LUSTRE_TESTS_CFG_DIR}/tests-to-skip.sh}
+
+if [ -f "$EXCEPT_LIST_FILE" ]; then
+    echo "Reading test skip list from $EXCEPT_LIST_FILE"
+    cat $EXCEPT_LIST_FILE
+    . $EXCEPT_LIST_FILE
+fi
+
 assert_DIR () {
     local failed=""
     [[ $DIR/ = $MOUNT/* ]] || \
@@ -1227,15 +1237,31 @@ wait_remote_prog () {
     return $rc
 }
 
-client_df() {
+clients_up() {
     # not every config has many clients
+    sleep 1
     if [ ! -z "$CLIENTS" ]; then
-        $PDSH $CLIENTS "df $MOUNT" > /dev/null
+        $PDSH $CLIENTS "stat -f $MOUNT" > /dev/null
+    else
+        stat -f $MOUNT > /dev/null
+    fi
+}
+
+client_up() {
+    local client=$1
+    # usually checked on particular client or locally
+    sleep 1
+    if [ ! -z "$client" ]; then
+        $PDSH $client "stat -f $MOUNT" > /dev/null
     else
-       df $MOUNT > /dev/null
+        stat -f $MOUNT > /dev/null
     fi
 }
 
+client_evicted() {
+    ! client_up $1
+}
+
 client_reconnect() {
     uname -n >> $MOUNT/recon
     if [ -z "$CLIENTS" ]; then
@@ -1311,7 +1337,7 @@ ost_evict_client() {
 
 fail() {
     facet_failover $* || error "failover: $?"
-    client_df || error "post-failover df: $?"
+    clients_up || error "post-failover df: $?"
 }
 
 fail_nodf() {
@@ -1325,9 +1351,8 @@ fail_abort() {
     refresh_disk ${facet}
     change_active $facet
     mount_facet $facet -o abort_recovery
-    client_df || echo "first df failed: $?"
-    sleep 1
-    client_df || error "post-failover df: $?"
+    clients_up || echo "first df failed: $?"
+    clients_up || error "post-failover df: $?"
 }
 
 do_lmc() {
@@ -1919,6 +1944,8 @@ init_param_vars () {
             $LFS quotaoff -ug $MOUNT > /dev/null 2>&1
         fi
     fi
+
+    return 0
 }
 
 nfs_client_mode () {
@@ -2130,9 +2157,9 @@ testslist_filter () {
     local start_at=$START_AT
     local stop_at=$STOP_AT
 
-    local var=${TESTSUITE}_START_AT
+    local var=${TESTSUITE//-/_}_START_AT
     [ x"${!var}" != x ] && start_at=${!var}
-    var=${TESTSUITE}_STOP_AT
+    var=${TESTSUITE//-/_}_STOP_AT
     [ x"${!var}" != x ] && stop_at=${!var}
 
     sed -n 's/^test_\([^ (]*\).*/\1/p' $script | \
@@ -2367,7 +2394,6 @@ stop_full_debug_logging() {
 error_noexit() {
     local TYPE=${TYPE:-"FAIL"}
     local ERRLOG
-    lctl set_param fail_loc=0 2>/dev/null || true
 
     local dump=true
     # do not dump logs if $1=false
@@ -2391,7 +2417,10 @@ error_noexit() {
 
 error() {
     error_noexit "$@"
-    $FAIL_ON_ERROR && exit 1 || true
+    if $FAIL_ON_ERROR; then
+        reset_fail_loc
+        exit 1
+    fi
 }
 
 error_exit() {
@@ -3198,7 +3227,6 @@ wait_clients_import_state () {
         *) error "unknown facet!" ;;
     esac
 
-
     if ! do_rpc_nodes $list wait_import_state $expected $proc_path; then
         error "import is not in ${expected} state"
         return 1
@@ -3222,6 +3250,44 @@ oos_full() {
         return $OSCFULL
 }
 
+pool_list () {
+   do_facet mgs lctl pool_list $1
+}
+
+create_pool() {
+    local fsname=${1%%.*}
+    local poolname=${1##$fsname.}
+
+    do_facet mgs lctl pool_new $1
+    local RC=$?
+    # get param should return err unless pool is created
+    [[ $RC -ne 0 ]] && return $RC
+
+    wait_update $HOSTNAME "lctl get_param -n lov.$fsname-*.pools.$poolname \
+        2>/dev/null || echo foo" "" || RC=1
+    if [[ $RC -eq 0 ]]; then
+        add_pool_to_list $1
+    else
+        error "pool_new failed $1"
+    fi
+    return $RC
+}
+
+add_pool_to_list () {
+    local fsname=${1%%.*}
+    local poolname=${1##$fsname.}
+
+    local listvar=${fsname}_CREATED_POOLS
+    eval export ${listvar}=$(expand_list ${!listvar} $poolname)
+}
+
+remove_pool_from_list () {
+    local fsname=${1%%.*}
+    local poolname=${1##$fsname.}
+
+    local listvar=${fsname}_CREATED_POOLS
+    eval export ${listvar}=$(exclude_items_from_list ${!listvar} $poolname)
+}
 
 destroy_pool_int() {
     local ost
@@ -3233,19 +3299,51 @@ destroy_pool_int() {
     do_facet mgs lctl pool_destroy $1
 }
 
+# <fsname>.<poolname> or <poolname>
 destroy_pool() {
+    local fsname=${1%%.*}
+    local poolname=${1##$fsname.}
+
+    [[ x$fsname = x$poolname ]] && fsname=$FSNAME
+
     local RC
 
-    do_facet $SINGLEMDS lctl pool_list $FSNAME.$1
-    RC=$?
-    [[ $RC -ne 0 ]] && return $RC
+    pool_list $fsname.$poolname || return $?
 
-    destroy_pool_int $FSNAME.$1
+    destroy_pool_int $fsname.$poolname
     RC=$?
     [[ $RC -ne 0 ]] && return $RC
 
-    wait_update $HOSTNAME "lctl get_param -n lov.$FSNAME-*.pools.$1 \
-      2>/dev/null || echo foo" "foo" && return 0
+    wait_update $HOSTNAME "lctl get_param -n lov.$fsname-*.pools.$poolname \
+      2>/dev/null || echo foo" "foo" || RC=1
+
+    if [[ $RC -eq 0 ]]; then
+        remove_pool_from_list $fsname.$poolname
+    else
+        error "destroy pool failed $1"
+    fi
+    return $RC
+}
+
+destroy_pools () {
+    local fsname=${1:-$FSNAME}
+    local poolname
+    local listvar=${fsname}_CREATED_POOLS
+
+    pool_list $fsname
+
+    [ x${!listvar} = x ] && return 0
+
+    echo destroy the created pools: ${!listvar}
+    for poolname in ${!listvar//,/ }; do
+        destroy_pool $fsname.$poolname 
+    done
+}
+
+cleanup_pools () {
+    local fsname=${1:-$FSNAME}
+    trap 0
+    destroy_pools $fsname
 }
 
 gather_logs () {
index 68ebd6c..e178f28 100644 (file)
@@ -21,7 +21,7 @@ EXTRA_PROGRAMS = wirecheck
 rootsbin_PROGRAMS = mount.lustre
 sbin_PROGRAMS = mkfs.lustre tunefs.lustre lctl wiretest \
        l_getidentity llverfs llverdev \
-       llog_reader lr_reader lshowmount lreplicate \
+       llog_reader lr_reader lshowmount lustre_rsync \
        ll_recover_lost_found_objs ltrack_stats
 if LIBPTHREAD
 sbin_PROGRAMS += loadgen
@@ -45,9 +45,9 @@ loadgen_SOURCES = loadgen.c lustre_cfg.c obd.c
 loadgen_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS)
 loadgen_DEPENDENCIES := $(LIBPTLCTL)
 
-lreplicate_SOURCES = lreplicate.c obd.c lustre_cfg.c lreplicate.h
-lreplicate_LDADD :=  $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL)
-lreplicate_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
+lustre_rsync_SOURCES = lustre_rsync.c obd.c lustre_cfg.c lustre_rsync.h
+lustre_rsync_LDADD :=  $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL)
+lustre_rsync_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
 
 ll_recover_lost_found_objs_SOURCES = ll_recover_lost_found_objs.c
 ll_recover_lost_found_objs_LDADD := $(LIBPTLCTL)
index 1f0f905..2457ba5 100644 (file)
@@ -133,7 +133,7 @@ command_t cmdlist[] = {
          "directory or recursively for all files in a directory tree.\n"
          "usage: getstripe [--obd|-O <uuid>] [--quiet | -q] [--verbose | -v]\n"
          "                 [--count | -c ] [--size | -s ] [--index | -i ]\n"
-         "                 [--offset | -o ] [--pool | -p ]\n"
+         "                 [--offset | -o ] [--pool | -p ] [--directory | -d]\n"
          "                 [--recursive | -r] <dir|file> ..."},
         {"pool_list", lfs_poollist, 0,
          "List pools or pool OSTs\n"
@@ -160,8 +160,8 @@ command_t cmdlist[] = {
          "\tkeywords are one of followings: config, deletions.\n"
          "\tnode name must be provided when use keyword config."},
         {"join", lfs_join, 0,
-         "join two lustre files into one - join A, B, will be like cat B >> A & del B\n"
-         "usage: join <filename_A> <filename_B>\n"},
+         "join two lustre files into one.\n"
+         "obsolete, HEAD does not support it anymore.\n"},
         {"osts", lfs_osts, 0, "osts"},
         {"df", lfs_df, 0,
          "report filesystem disk space usage or inodes usage"
@@ -824,14 +824,15 @@ static int lfs_getstripe(int argc, char **argv)
                 {"offset", 0, 0, 'o'},
                 {"pool", 0, 0, 'p'},
                 {"verbose", 0, 0, 'v'},
+                {"directory", 0, 0, 'd'},
                 {0, 0, 0, 0}
         };
-        char short_opts[] = "hO:qrvcsiop";
         int c, rc;
         struct find_param param = { 0 };
 
+        param.maxdepth = 1;
         optind = 0;
-        while ((c = getopt_long(argc, argv, short_opts,
+        while ((c = getopt_long(argc, argv, "cdhioO:pqrsv",
                                 long_opts, NULL)) != -1) {
                 switch (c) {
                 case 'O':
@@ -846,22 +847,33 @@ static int lfs_getstripe(int argc, char **argv)
                 case 'q':
                         param.quiet++;
                         break;
+                case 'd':
+                        param.maxdepth = 0;
+                        break;
                 case 'r':
                         param.recursive = 1;
                         break;
                 case 'v':
                         param.verbose = VERBOSE_ALL | VERBOSE_DETAIL;
-                        param.quiet = 0;
                         break;
                 case 'c':
-                        param.verbose |= VERBOSE_COUNT;
+                        if (!(param.verbose & VERBOSE_DETAIL)) {
+                                param.verbose |= VERBOSE_COUNT;
+                                param.maxdepth = 0;
+                        }
                         break;
                 case 's':
-                        param.verbose |= VERBOSE_SIZE;
+                        if (!(param.verbose & VERBOSE_DETAIL)) {
+                                param.verbose |= VERBOSE_SIZE;
+                                param.maxdepth = 0;
+                        }
                         break;
                 case 'i':
                 case 'o':
-                        param.verbose |= VERBOSE_OFFSET;
+                        if (!(param.verbose & VERBOSE_DETAIL)) {
+                                param.verbose |= VERBOSE_OFFSET;
+                                param.maxdepth = 0;
+                        }
                         break;
                 case 'p':
                         param.verbose |= VERBOSE_POOL;
@@ -878,7 +890,13 @@ static int lfs_getstripe(int argc, char **argv)
         if (optind >= argc)
                 return CMD_HELP;
 
-        param.maxdepth = param.recursive ? -1 : 1;
+        if (param.recursive)
+                param.maxdepth = -1;
+
+        if (!param.verbose)
+                param.verbose = VERBOSE_ALL;
+        if (param.quiet)
+                param.verbose = VERBOSE_OBJID;
 
         do {
                 rc = llapi_getstripe(argv[optind], &param);
@@ -901,7 +919,7 @@ static int lfs_osts(int argc, char **argv)
 
         while (llapi_search_mounts(NULL, index++, mntdir, NULL) == 0) {
                 memset(&param, 0, sizeof(param));
-                rc = llapi_getstripe(mntdir, &param);
+                rc = llapi_ostlist(mntdir, &param);
                 if (rc) {
                         fprintf(stderr, "error: %s: failed on %s\n",
                                 argv[0], mntdir);
@@ -1244,37 +1262,11 @@ static int lfs_catinfo(int argc, char **argv)
         return rc;
 }
 
-int lfs_join(int argc, char **argv)
+static int lfs_join(int argc, char **argv)
 {
-        char *name_head, *name_tail;
-        int fd, rc;
-        loff_t size;
-
-        if (argc != 3)
-                return CMD_HELP;
-        name_head = argv[1];
-        fd = open(name_head, O_WRONLY);
-        if (fd < 0) {
-                fprintf(stderr, "Can not open name_head %s rc=%d\n",
-                        name_head, fd);
-                return fd;
-        }
-        size = lseek(fd, 0, SEEK_END);
-        if (size % JOIN_FILE_ALIGN) {
-                fprintf(stderr,"head file %s size %llu must be mutiple of %d\n",
-                        name_head, (long long)size, JOIN_FILE_ALIGN);
-                rc = -EINVAL;
-                goto out;
-        }
-        name_tail = argv[2];
-        rc = ioctl(fd, LL_IOC_JOIN, name_tail);
-out:
-        close(fd);
-        if (rc) {
-                fprintf(stderr, "Lustre joining files: %s, %s, failed\n",
-                        argv[1], argv[2]);
-        }
-        return rc;
+        fprintf(stderr, "join two lustre files into one.\n"
+                        "obsolete, HEAD does not support it anymore.\n");
+        return 0;
 }
 
 #ifdef HAVE_SYS_QUOTA_H
index 730f085..4327738 100644 (file)
@@ -261,7 +261,98 @@ int llapi_stripe_limit_check(unsigned long long stripe_size, int stripe_offset,
         return 0;
 }
 
-static int poolpath(char *fsname, char *pathname, char *pool_pathname);
+static int find_target_obdpath(char *fsname, char *path)
+{
+        glob_t glob_info;
+        char pattern[PATH_MAX + 1];
+        int rc;
+
+        snprintf(pattern, PATH_MAX,
+                 "/proc/fs/lustre/lov/%s-*/target_obd",
+                 fsname);
+        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
+        if (rc == GLOB_NOMATCH)
+                return -ENODEV;
+        else if (rc)
+                return -EINVAL;
+
+        strcpy(path, glob_info.gl_pathv[0]);
+        globfree(&glob_info);
+        return 0;
+}
+
+static int find_poolpath(char *fsname, char *poolname, char *poolpath)
+{
+        glob_t glob_info;
+        char pattern[PATH_MAX + 1];
+        int rc;
+
+        snprintf(pattern, PATH_MAX,
+                 "/proc/fs/lustre/lov/%s-*/pools/%s",
+                 fsname, poolname);
+        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
+        /* If no pools, make sure the lov is available */
+        if ((rc == GLOB_NOMATCH) &&
+            (find_target_obdpath(fsname, poolpath) == -ENODEV))
+                return -ENODEV;
+        if (rc)
+                return -EINVAL;
+
+        strcpy(poolpath, glob_info.gl_pathv[0]);
+        globfree(&glob_info);
+        return 0;
+}
+
+/*
+ * if pool is NULL, search ostname in target_obd
+ * if pool is not NULL:
+ *  if pool not found returns errno < 0
+ *  if ostname is NULL, returns 1 if pool is not empty and 0 if pool empty
+ *  if ostname is not NULL, returns 1 if OST is in pool and 0 if not
+ */
+int llapi_search_ost(char *fsname, char *poolname, char *ostname)
+{
+        FILE *fd;
+        char buffer[PATH_MAX + 1];
+        int len = 0, rc;
+
+        if (ostname != NULL)
+                len = strlen(ostname);
+
+        if (poolname == NULL)
+                rc = find_target_obdpath(fsname, buffer);
+        else
+                rc = find_poolpath(fsname, poolname, buffer);
+        if (rc)
+                return rc;
+
+        if ((fd = fopen(buffer, "r")) == NULL)
+                return -EINVAL;
+
+        while (fgets(buffer, sizeof(buffer), fd) != NULL) {
+                if (poolname == NULL) {
+                        char *ptr;
+                        /* Search for an ostname in the list of OSTs
+                         Line format is IDX: fsname-OSTxxxx_UUID STATUS */
+                        ptr = strchr(buffer, ' ');
+                        if ((ptr != NULL) &&
+                            (strncmp(ptr + 1, ostname, len) == 0)) {
+                                fclose(fd);
+                                return 1;
+                        }
+                } else {
+                        /* Search for an ostname in a pool,
+                         (or an existing non-empty pool if no ostname) */
+                        if ((ostname == NULL) ||
+                            (strncmp(buffer, ostname, len) == 0)) {
+                                fclose(fd);
+                                return 1;
+                        }
+                }
+        }
+        fclose(fd);
+        return 0;
+}
 
 int llapi_file_open_pool(const char *name, int flags, int mode,
                          unsigned long long stripe_size, int stripe_offset,
@@ -270,7 +361,40 @@ int llapi_file_open_pool(const char *name, int flags, int mode,
         struct lov_user_md_v3 lum = { 0 };
         int fd, rc = 0;
         int isdir = 0;
-        char fsname[MAX_OBD_NAME + 1], *ptr;
+
+        /* Make sure we have a good pool */
+        if (pool_name != NULL) {
+                char fsname[MAX_OBD_NAME + 1], *ptr;
+
+                if (llapi_search_fsname(name, fsname)) {
+                    llapi_err(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO,
+                              "'%s' is not on a Lustre filesystem", name);
+                    return -EINVAL;
+                }
+
+                /* in case user gives the full pool name <fsname>.<poolname>,
+                 * strip the fsname */
+                ptr = strchr(pool_name, '.');
+                if (ptr != NULL) {
+                        *ptr = '\0';
+                        if (strcmp(pool_name, fsname) != 0) {
+                                *ptr = '.';
+                                llapi_err(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO,
+                                   "Pool '%s' is not on filesystem '%s'",
+                                   pool_name, fsname);
+                                return -EINVAL;
+                        }
+                        pool_name = ptr + 1;
+                }
+
+                /* Make sure the pool exists and is non-empty */
+                if ((rc = llapi_search_ost(fsname, pool_name, NULL)) < 1) {
+                        llapi_err(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO,
+                                  "pool '%s.%s' %s", fsname, pool_name,
+                                  rc == 0 ? "has no OSTs" : "does not exist");
+                        return -EINVAL;
+                }
+        }
 
         fd = open(name, flags | O_LOV_DELAY_CREATE, mode);
         if (fd < 0 && errno == EISDIR) {
@@ -296,19 +420,7 @@ int llapi_file_open_pool(const char *name, int flags, int mode,
         lum.lmm_stripe_size = stripe_size;
         lum.lmm_stripe_count = stripe_count;
         lum.lmm_stripe_offset = stripe_offset;
-
-        /* in case user give the full pool name <fsname>.<poolname>, skip
-         * the fsname */
         if (pool_name != NULL) {
-                ptr = strchr(pool_name, '.');
-                if (ptr != NULL) {
-                        strncpy(fsname, pool_name, ptr - pool_name);
-                        *ptr = '\0';
-                        /* if fsname matches a filesystem skip it
-                         * if not keep the poolname as is */
-                        if (poolpath(fsname, NULL, NULL) == 0)
-                                pool_name = ptr + 1;
-                }
                 strncpy(lum.lmm_pool_name, pool_name, LOV_MAXPOOLNAME);
         } else {
                 /* If no pool is specified at all, use V1 request */
@@ -388,7 +500,7 @@ static int get_root_path(int want, char *fsname, int *outfd, char *path,
 {
         struct mntent mnt;
         char buf[PATH_MAX], mntdir[PATH_MAX];
-        char *name = NULL, *ptr;
+        char *ptr;
         FILE *fp;
         int idx = 0, len = 0, mntlen, fd;
         int rc = -ENODEV;
@@ -419,7 +531,7 @@ static int get_root_path(int want, char *fsname, int *outfd, char *path,
                 if ((want & WANT_INDEX) && (idx++ != index))
                         continue;
 
-                /* Check the fsname for a match */
+                /* Check the fsname for a match, if given */
                 if (!(want & WANT_FSNAME) && fsname != NULL &&
                     (strlen(fsname) > 0) && (strcmp(ptr, fsname) != 0))
                         continue;
@@ -427,15 +539,17 @@ static int get_root_path(int want, char *fsname, int *outfd, char *path,
                 /* If the path isn't set return the first one we find */
                 if (path == NULL || strlen(path) == 0) {
                         strcpy(mntdir, mnt.mnt_dir);
-                        name = ptr;
+                        if ((want & WANT_FSNAME) && fsname != NULL)
+                                strcpy(fsname, ptr);
                         rc = 0;
                         break;
                 /* Otherwise find the longest matching path */
                 } else if ((strlen(path) >= mntlen) && (mntlen >= len) &&
                            (strncmp(mnt.mnt_dir, path, mntlen) == 0)) {
                         strcpy(mntdir, mnt.mnt_dir);
-                        mntlen = len;
-                        name = ptr;
+                        len = mntlen;
+                        if ((want & WANT_FSNAME) && fsname != NULL)
+                                strcpy(fsname, ptr);
                         rc = 0;
                 }
         }
@@ -443,8 +557,6 @@ static int get_root_path(int want, char *fsname, int *outfd, char *path,
 
         /* Found it */
         if (rc == 0) {
-                if ((want & WANT_FSNAME) && fsname != NULL)
-                        strcpy(fsname, name);
                 if ((want & WANT_PATH) && path != NULL)
                         strcpy(path, mntdir);
                 if (want & WANT_FD) {
@@ -785,6 +897,205 @@ static void find_param_fini(struct find_param *param)
                 free(param->lmd);
 }
 
+static int cb_common_fini(char *path, DIR *parent, DIR *d, void *data,
+                          cfs_dirent_t *de)
+{
+        struct find_param *param = (struct find_param *)data;
+        param->depth--;
+        return 0;
+}
+
+static DIR *opendir_parent(char *path)
+{
+        DIR *parent;
+        char *fname;
+        char c;
+
+        fname = strrchr(path, '/');
+        if (fname == NULL)
+                return opendir(".");
+
+        c = fname[1];
+        fname[1] = '\0';
+        parent = opendir(path);
+        fname[1] = c;
+        return parent;
+}
+
+int llapi_mds_getfileinfo(char *path, DIR *parent,
+                          struct lov_user_mds_data *lmd)
+{
+        lstat_t *st = &lmd->lmd_st;
+        char *fname = strrchr(path, '/');
+        int ret = 0;
+
+        if (parent == NULL)
+                return -EINVAL;
+
+        fname = (fname == NULL ? path : fname + 1);
+        /* retrieve needed file info */
+        strncpy((char *)lmd, fname,
+                lov_mds_md_size(MAX_LOV_UUID_COUNT, LOV_MAGIC));
+        ret = ioctl(dirfd(parent), IOC_MDC_GETFILEINFO, (void *)lmd);
+
+        if (ret) {
+                if (errno == ENOTTY) {
+                        /* ioctl is not supported, it is not a lustre fs.
+                         * Do the regular lstat(2) instead. */
+                        ret = lstat_f(path, st);
+                        if (ret) {
+                                llapi_err(LLAPI_MSG_ERROR,
+                                          "error: %s: lstat failed for %s",
+                                          __FUNCTION__, path);
+                                return ret;
+                        }
+                } else if (errno == ENOENT) {
+                        llapi_err(LLAPI_MSG_WARN,
+                                  "warning: %s: %s does not exist",
+                                  __FUNCTION__, path);
+                        return -ENOENT;
+                } else {
+                        llapi_err(LLAPI_MSG_ERROR,
+                                 "error: %s: IOC_MDC_GETFILEINFO failed for %s",
+                                 __FUNCTION__, path);
+                        return ret;
+                }
+        }
+
+        return 0;
+}
+
+static int llapi_semantic_traverse(char *path, int size, DIR *parent,
+                                   semantic_func_t sem_init,
+                                   semantic_func_t sem_fini, void *data,
+                                   cfs_dirent_t *de)
+{
+        cfs_dirent_t *dent;
+        int len, ret;
+        DIR *d, *p = NULL;
+
+        ret = 0;
+        len = strlen(path);
+
+        d = opendir(path);
+        if (!d && errno != ENOTDIR) {
+                llapi_err(LLAPI_MSG_ERROR, "%s: Failed to open '%s'",
+                          __FUNCTION__, path);
+                return -EINVAL;
+        } else if (!d && !parent) {
+                /* ENOTDIR. Open the parent dir. */
+                p = opendir_parent(path);
+                if (!p)
+                        GOTO(out, ret = -EINVAL);
+        }
+
+        if (sem_init && (ret = sem_init(path, parent ?: p, d, data, de)))
+                goto err;
+
+        if (!d)
+                GOTO(out, ret = 0);
+
+        while ((dent = readdir64(d)) != NULL) {
+                ((struct find_param *)data)->have_fileinfo = 0;
+
+                if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
+                        continue;
+
+                /* Don't traverse .lustre directory */
+                if (!(strcmp(dent->d_name, dot_lustre_name)))
+                        continue;
+
+                path[len] = 0;
+                if ((len + dent->d_reclen + 2) > size) {
+                        llapi_err(LLAPI_MSG_ERROR,
+                                  "error: %s: string buffer is too small",
+                                  __FUNCTION__);
+                        break;
+                }
+                strcat(path, "/");
+                strcat(path, dent->d_name);
+
+                if (dent->d_type == DT_UNKNOWN) {
+                        lstat_t *st = &((struct find_param *)data)->lmd->lmd_st;
+
+                        ret = llapi_mds_getfileinfo(path, d,
+                                             ((struct find_param *)data)->lmd);
+                        if (ret == 0) {
+                                ((struct find_param *)data)->have_fileinfo = 1;
+                                dent->d_type =
+                                        llapi_filetype_dir_table[st->st_mode &
+                                                                 S_IFMT];
+                        }
+                        if (ret == -ENOENT)
+                                continue;
+                }
+
+                switch (dent->d_type) {
+                case DT_UNKNOWN:
+                        llapi_err(LLAPI_MSG_ERROR,
+                                  "error: %s: '%s' is UNKNOWN type %d",
+                                  __FUNCTION__, dent->d_name, dent->d_type);
+                        break;
+                case DT_DIR:
+                        ret = llapi_semantic_traverse(path, size, d, sem_init,
+                                                      sem_fini, data, dent);
+                        if (ret < 0)
+                                goto out;
+                        break;
+                default:
+                        ret = 0;
+                        if (sem_init) {
+                                ret = sem_init(path, d, NULL, data, dent);
+                                if (ret < 0)
+                                        goto out;
+                        }
+                        if (sem_fini && ret == 0)
+                                sem_fini(path, d, NULL, data, dent);
+                }
+        }
+
+out:
+        path[len] = 0;
+
+        if (sem_fini)
+                sem_fini(path, parent, d, data, de);
+err:
+        if (d)
+                closedir(d);
+        if (p)
+                closedir(p);
+        return ret;
+}
+
+static int param_callback(char *path, semantic_func_t sem_init,
+                          semantic_func_t sem_fini, struct find_param *param)
+{
+        int ret, len = strlen(path);
+        char *buf;
+
+        if (len > PATH_MAX) {
+                llapi_err(LLAPI_MSG_ERROR, "Path name '%s' is too long", path);
+                return -EINVAL;
+        }
+
+        buf = (char *)malloc(PATH_MAX + 1);
+        if (!buf)
+                return -ENOMEM;
+
+        ret = common_param_init(param);
+        if (ret)
+                goto out;
+        param->depth = 0;
+
+        strncpy(buf, path, PATH_MAX + 1);
+        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, sem_init,
+                                      sem_fini, param, NULL);
+out:
+        find_param_fini(param);
+        free(buf);
+        return ret < 0 ? ret : 0;
+}
+
 int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_name)
 {
         int rc = ioctl(fd, OBD_IOC_GETNAME, lov_name);
@@ -904,6 +1215,9 @@ static int setup_obd_uuid(DIR *dir, char *dname, struct find_param *param)
         FILE *fp;
         int rc = 0, index;
 
+        if (param->got_uuids)
+                return rc;
+
         /* Get the lov name */
         rc = llapi_file_fget_lov_uuid(dirfd(dir), &lov_uuid);
         if (rc) {
@@ -950,8 +1264,7 @@ static int setup_obd_uuid(DIR *dir, char *dname, struct find_param *param)
 
         fclose(fp);
 
-        if (!param->quiet && param->obduuid &&
-            (param->obdindex == OBD_NOT_FOUND)) {
+        if (param->obduuid && (param->obdindex == OBD_NOT_FOUND)) {
                 llapi_err_noerrno(LLAPI_MSG_ERROR,
                                   "error: %s: unknown obduuid: %s",
                                   __FUNCTION__, param->obduuid->uuid);
@@ -1027,14 +1340,36 @@ retry_get_uuids:
         return ret;
 }
 
+static int cb_ostlist(char *path, DIR *parent, DIR *d, void *data,
+                      struct dirent64 *de)
+{
+        struct find_param *param = (struct find_param *)data;
+
+        LASSERT(parent != NULL || d != NULL);
+
+        /* Prepare odb. */
+        return setup_obd_uuid(d ? d : parent, path, param);
+}
+
+int llapi_ostlist(char *path, struct find_param *param)
+{
+        return param_callback(path, cb_ostlist, cb_common_fini, param);
+}
+
 static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
-                                     int is_dir, int verbose, int quiet,
+                                     int is_dir, int verbose, int depth,
                                      char *pool_name)
 {
         char *prefix = is_dir ? "" : "lmm_";
         char nl = is_dir ? ' ' : '\n';
 
-        if (verbose && path)
+        if (is_dir && lum->lmm_object_gr == LOV_OBJECT_GROUP_DEFAULT) {
+                lum->lmm_object_gr = LOV_OBJECT_GROUP_CLEAR;
+                if (verbose & VERBOSE_DETAIL)
+                        llapi_printf(LLAPI_MSG_NORMAL, "(Default) ");
+        }
+
+        if (depth && path && ((verbose != VERBOSE_OBJID) || !is_dir))
                 llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
 
         if ((verbose & VERBOSE_DETAIL) && !is_dir) {
@@ -1047,7 +1382,7 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
         }
 
         if (verbose & VERBOSE_COUNT) {
-                if (!quiet)
+                if (verbose & ~VERBOSE_COUNT)
                         llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_count:   ",
                                      prefix);
                 llapi_printf(LLAPI_MSG_NORMAL, "%hd%c",
@@ -1055,7 +1390,7 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
         }
 
         if (verbose & VERBOSE_SIZE) {
-                if (!quiet)
+                if (verbose & ~VERBOSE_SIZE)
                         llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_size:    ",
                                      prefix);
                 llapi_printf(LLAPI_MSG_NORMAL, "%u%c", lum->lmm_stripe_size,
@@ -1068,137 +1403,56 @@ static void lov_dump_user_lmm_header(struct lov_user_md *lum, char *path,
         }
 
         if (verbose & VERBOSE_OFFSET) {
-                if (!quiet)
-                        llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_offset:   ",
+                if (verbose & ~VERBOSE_OFFSET)
+                        llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_offset:  ",
                                      prefix);
                 llapi_printf(LLAPI_MSG_NORMAL, "%u%c",
                              lum->lmm_objects[0].l_ost_idx, nl);
         }
 
-        if ((verbose & VERBOSE_POOL) && (pool_name != NULL))
-                llapi_printf(LLAPI_MSG_NORMAL, "pool: %s%c", pool_name, nl);
+        if ((verbose & VERBOSE_POOL) && (pool_name != NULL)) {
+                llapi_printf(LLAPI_MSG_NORMAL, "pool: %s", pool_name);
+                is_dir = 1;
+        }
 
-        if (is_dir)
+        if (is_dir && (verbose != VERBOSE_OBJID))
                 llapi_printf(LLAPI_MSG_NORMAL, "\n");
 }
 
 void lov_dump_user_lmm_v1v3(struct lov_user_md *lum, char *pool_name,
                             struct lov_user_ost_data_v1 *objects,
                             char *path, int is_dir,
-                            int obdindex, int quiet, int header, int body)
-{
-        int i, obdstripe = 0;
-
-        if (obdindex != OBD_NOT_FOUND) {
-                for (i = 0; !is_dir && i < lum->lmm_stripe_count; i++) {
-                        if (obdindex == objects[i].l_ost_idx) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                                obdstripe = 1;
-                                break;
-                        }
-                }
-        } else {
-                if (!quiet)
-                        llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                obdstripe = 1;
-        }
-
-        /* if it's a directory */
-        if (is_dir) {
-                if (obdstripe == 1) {
-                        if (lum->lmm_object_gr == LOV_OBJECT_GROUP_DEFAULT) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "(Default) ");
-                                lum->lmm_object_gr = LOV_OBJECT_GROUP_CLEAR;
-                        }
-                        /* maintain original behavior */
-                        if (!header)
-                                header |= VERBOSE_ALL;
-                        lov_dump_user_lmm_header(lum, path, is_dir, header,
-                                                 quiet, pool_name);
-                }
-                return;
-        }
-
-        if (header && (obdstripe == 1))
-                lov_dump_user_lmm_header(lum, NULL, is_dir, header, quiet,
-                                         pool_name);
-
-        if (body) {
-                if ((!quiet) && (obdstripe == 1))
-                        llapi_printf(LLAPI_MSG_NORMAL,
-                                     "\tobdidx\t\t objid\t\tobjid\t\t group\n");
-
-                for (i = 0; i < lum->lmm_stripe_count; i++) {
-                        int idx = objects[i].l_ost_idx;
-                        long long oid = objects[i].l_object_id;
-                        long long gr = objects[i].l_object_gr;
-                        if ((obdindex == OBD_NOT_FOUND) || (obdindex == idx))
-                                llapi_printf(LLAPI_MSG_NORMAL,
-                                           "\t%6u\t%14llu\t%#13llx\t%14llu%s\n",
-                                           idx, oid, oid, gr,
-                                           obdindex == idx ? " *" : "");
-                }
-                llapi_printf(LLAPI_MSG_NORMAL, "\n");
-        }
-}
-
-void lov_dump_user_lmm_join(struct lov_user_md_v1 *lum, char *path,
-                            int is_dir, int obdindex, int quiet,
-                            int header, int body)
+                            int obdindex, int depth, int header)
 {
-        struct lov_user_md_join *lumj = (struct lov_user_md_join *)lum;
-        int i, obdstripe = 0;
+        int i, obdstripe = (obdindex != OBD_NOT_FOUND) ? 0 : 1;
 
-        if (obdindex != OBD_NOT_FOUND) {
-                for (i = 0; i < lumj->lmm_stripe_count; i++) {
-                        if (obdindex == lumj->lmm_objects[i].l_ost_idx) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
+        if (!obdstripe) {
+                for (i = 0; !is_dir && i < lum->lmm_stripe_count; i++) {
+                        if (obdindex == objects[i].l_ost_idx) {
                                 obdstripe = 1;
                                 break;
                         }
                 }
-        } else {
-                if (!quiet)
-                        llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                obdstripe = 1;
         }
 
-        if (header && obdstripe == 1) {
-                lov_dump_user_lmm_header(lum, NULL, 0, header, quiet, NULL);
-
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_extent_count:   %x\n",
-                             lumj->lmm_extent_count);
-        }
+        if (obdstripe == 1)
+                lov_dump_user_lmm_header(lum, path, is_dir, header, depth,
+                                         pool_name);
 
-        if (body) {
-                unsigned long long start = -1, end = 0;
-                if (!quiet && obdstripe == 1)
+        if (!is_dir && (header & VERBOSE_OBJID)) {
+                if (obdstripe == 1)
                         llapi_printf(LLAPI_MSG_NORMAL,
-                                     "joined\tobdidx\t\t objid\t\tobjid\t\t "
-                                     "group\t\tstart\t\tend\n");
-                for (i = 0; i < lumj->lmm_stripe_count; i++) {
-                        int idx = lumj->lmm_objects[i].l_ost_idx;
-                        long long oid = lumj->lmm_objects[i].l_object_id;
-                        long long gr = lumj->lmm_objects[i].l_object_gr;
-                        if (obdindex == OBD_NOT_FOUND || obdindex == idx)
+                                     "\tobdidx\t\t objid\t\tobjid\t\t group\n");
+
+                for (i = 0; i < lum->lmm_stripe_count; i++) {
+                        int idx = objects[i].l_ost_idx;
+                        long long oid = objects[i].l_object_id;
+                        long long gr = objects[i].l_object_gr;
+                        if ((obdindex == OBD_NOT_FOUND) || (obdindex == idx))
                                 llapi_printf(LLAPI_MSG_NORMAL,
-                                             "\t%6u\t%14llu\t%#13llx\t%14llu%s",
-                                             idx, oid, oid, gr,
-                                             obdindex == idx ? " *" : "");
-                        if (start != lumj->lmm_objects[i].l_extent_start ||
-                            end != lumj->lmm_objects[i].l_extent_end) {
-                                start = lumj->lmm_objects[i].l_extent_start;
-                                llapi_printf(LLAPI_MSG_NORMAL,"\t%14llu",start);
-                                end = lumj->lmm_objects[i].l_extent_end;
-                                if (end == (unsigned long long)-1)
-                                        llapi_printf(LLAPI_MSG_NORMAL,
-                                                     "\t\tEOF\n");
-                                else
-                                        llapi_printf(LLAPI_MSG_NORMAL,
-                                                     "\t\t%llu\n", end);
-                        } else {
-                                llapi_printf(LLAPI_MSG_NORMAL, "\t\t\t\t\n");
-                        }
+                                           "\t%6u\t%14llu\t%#13llx\t%14llu%s\n",
+                                           idx, oid, oid, gr,
+                                           obdindex == idx ? " *" : "");
                 }
                 llapi_printf(LLAPI_MSG_NORMAL, "\n");
         }
@@ -1212,15 +1466,8 @@ void llapi_lov_dump_user_lmm(struct find_param *param,
                 lov_dump_user_lmm_v1v3(&param->lmd->lmd_lmm, NULL,
                                        param->lmd->lmd_lmm.lmm_objects,
                                        path, is_dir,
-                                       param->obdindex, param->quiet,
-                                       param->verbose,
-                                       (param->verbose || !param->obduuid));
-                break;
-        case LOV_USER_MAGIC_JOIN:
-                lov_dump_user_lmm_join(&param->lmd->lmd_lmm, path, is_dir,
-                                       param->obdindex, param->quiet,
-                                       param->verbose,
-                                       (param->verbose || !param->obduuid));
+                                       param->obdindex, param->maxdepth,
+                                       param->verbose);
                 break;
         case LOV_USER_MAGIC_V3: {
                 char pool_name[LOV_MAXPOOLNAME + 1];
@@ -1232,17 +1479,15 @@ void llapi_lov_dump_user_lmm(struct find_param *param,
                 objects = lmmv3->lmm_objects;
                 lov_dump_user_lmm_v1v3(&param->lmd->lmd_lmm, pool_name,
                                        objects, path, is_dir,
-                                       param->obdindex, param->quiet,
-                                       param->verbose,
-                                       (param->verbose || !param->obduuid));
+                                       param->obdindex, param->maxdepth,
+                                       param->verbose);
                 break;
         }
         default:
                 llapi_printf(LLAPI_MSG_NORMAL, "unknown lmm_magic:  %#x "
                              "(expecting one of %#x %#x %#x)\n",
                              *(__u32 *)&param->lmd->lmd_lmm,
-                             LOV_USER_MAGIC_V1, LOV_USER_MAGIC_JOIN,
-                             LOV_USER_MAGIC_V3);
+                             LOV_USER_MAGIC_V1, LOV_USER_MAGIC_V3);
                 return;
         }
 }
@@ -1315,168 +1560,6 @@ int llapi_file_lookup(int dirfd, const char *name)
         return ioctl(dirfd, IOC_MDC_LOOKUP, buf);
 }
 
-int llapi_mds_getfileinfo(char *path, DIR *parent,
-                          struct lov_user_mds_data *lmd)
-{
-        lstat_t *st = &lmd->lmd_st;
-        char *fname = strrchr(path, '/');
-        int ret = 0;
-
-        if (parent == NULL)
-                return -EINVAL;
-
-        fname = (fname == NULL ? path : fname + 1);
-        /* retrieve needed file info */
-        strncpy((char *)lmd, fname,
-                lov_mds_md_size(MAX_LOV_UUID_COUNT, LOV_MAGIC));
-        ret = ioctl(dirfd(parent), IOC_MDC_GETFILEINFO, (void *)lmd);
-
-        if (ret) {
-                if (errno == ENOTTY) {
-                        /* ioctl is not supported, it is not a lustre fs.
-                         * Do the regular lstat(2) instead. */
-                        ret = lstat_f(path, st);
-                        if (ret) {
-                                llapi_err(LLAPI_MSG_ERROR,
-                                          "error: %s: lstat failed for %s",
-                                          __FUNCTION__, path);
-                                return ret;
-                        }
-                } else if (errno == ENOENT) {
-                        llapi_err(LLAPI_MSG_WARN,
-                                  "warning: %s: %s does not exist",
-                                  __FUNCTION__, path);
-                        return -ENOENT;
-                } else {
-                        llapi_err(LLAPI_MSG_ERROR,
-                                 "error: %s: IOC_MDC_GETFILEINFO failed for %s",
-                                 __FUNCTION__, path);
-                        return ret;
-                }
-        }
-
-        return 0;
-}
-
-static DIR *opendir_parent(char *path)
-{
-        DIR *parent;
-        char *fname;
-        char c;
-
-        fname = strrchr(path, '/');
-        if (fname == NULL)
-                return opendir(".");
-
-        c = fname[1];
-        fname[1] = '\0';
-        parent = opendir(path);
-        fname[1] = c;
-        return parent;
-}
-
-static int llapi_semantic_traverse(char *path, int size, DIR *parent,
-                                   semantic_func_t sem_init,
-                                   semantic_func_t sem_fini, void *data,
-                                   cfs_dirent_t *de)
-{
-        cfs_dirent_t *dent;
-        int len, ret;
-        DIR *d, *p = NULL;
-
-        ret = 0;
-        len = strlen(path);
-
-        d = opendir(path);
-        if (!d && errno != ENOTDIR) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Failed to open '%s'",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        } else if (!d && !parent) {
-                /* ENOTDIR. Open the parent dir. */
-                p = opendir_parent(path);
-                if (!p)
-                        GOTO(out, ret = -EINVAL);
-        }
-
-        if (sem_init && (ret = sem_init(path, parent ?: p, d, data, de)))
-                goto err;
-
-        if (!d)
-                GOTO(out, ret = 0);
-
-        while ((dent = readdir64(d)) != NULL) {
-                ((struct find_param *)data)->have_fileinfo = 0;
-
-                if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
-                        continue;
-
-                /* Don't traverse .lustre directory */
-                if (!(strcmp(dent->d_name, dot_lustre_name)))
-                        continue;
-
-                path[len] = 0;
-                if ((len + dent->d_reclen + 2) > size) {
-                        llapi_err(LLAPI_MSG_ERROR,
-                                  "error: %s: string buffer is too small",
-                                  __FUNCTION__);
-                        break;
-                }
-                strcat(path, "/");
-                strcat(path, dent->d_name);
-
-                if (dent->d_type == DT_UNKNOWN) {
-                        lstat_t *st = &((struct find_param *)data)->lmd->lmd_st;
-
-                        ret = llapi_mds_getfileinfo(path, d,
-                                             ((struct find_param *)data)->lmd);
-                        if (ret == 0) {
-                                ((struct find_param *)data)->have_fileinfo = 1;
-                                dent->d_type =
-                                        llapi_filetype_dir_table[st->st_mode &
-                                                                 S_IFMT];
-                        }
-                        if (ret == -ENOENT)
-                                continue;
-                }
-
-                switch (dent->d_type) {
-                case DT_UNKNOWN:
-                        llapi_err(LLAPI_MSG_ERROR,
-                                  "error: %s: '%s' is UNKNOWN type %d",
-                                  __FUNCTION__, dent->d_name, dent->d_type);
-                        break;
-                case DT_DIR:
-                        ret = llapi_semantic_traverse(path, size, d, sem_init,
-                                                      sem_fini, data, dent);
-                        if (ret < 0)
-                                goto out;
-                        break;
-                default:
-                        ret = 0;
-                        if (sem_init) {
-                                ret = sem_init(path, d, NULL, data, dent);
-                                if (ret < 0)
-                                        goto out;
-                        }
-                        if (sem_fini && ret == 0)
-                                sem_fini(path, d, NULL, data, dent);
-                }
-        }
-
-out:
-        path[len] = 0;
-
-        if (sem_fini)
-                sem_fini(path, parent, d, data, de);
-err:
-        if (d)
-                closedir(d);
-        if (p)
-                closedir(p);
-        return ret;
-}
-
 /* Check if the value matches 1 of the given criteria (e.g. --atime +/-N).
  * @mds indicates if this is MDS timestamps and there are attributes on OSTs.
  *
@@ -1859,44 +1942,9 @@ decided:
         return 0;
 }
 
-static int cb_common_fini(char *path, DIR *parent, DIR *d, void *data,
-                          cfs_dirent_t *de)
-{
-        struct find_param *param = (struct find_param *)data;
-        param->depth--;
-        return 0;
-}
-
 int llapi_find(char *path, struct find_param *param)
 {
-        char *buf;
-        int ret, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
-
-        ret = common_param_init(param);
-        if (ret) {
-                free(buf);
-                return ret;
-        }
-
-        param->depth = 0;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_find_init,
-                                      cb_common_fini, param, NULL);
-
-        find_param_fini(param);
-        free(buf);
-        return ret < 0 ? ret : 0;
+        return param_callback(path, cb_find_init, cb_common_fini, param);        
 }
 
 static int cb_getstripe(char *path, DIR *parent, DIR *d, void *data,
@@ -1907,8 +1955,8 @@ static int cb_getstripe(char *path, DIR *parent, DIR *d, void *data,
 
         LASSERT(parent != NULL || d != NULL);
 
-        /* Prepare odb. */
-        if (!param->got_uuids) {
+        if (param->obduuid) {
+                param->quiet = 1;
                 ret = setup_obd_uuid(d ? d : parent, path, param);
                 if (ret)
                         return ret;
@@ -1928,7 +1976,7 @@ static int cb_getstripe(char *path, DIR *parent, DIR *d, void *data,
 
         if (ret) {
                 if (errno == ENODATA) {
-                        if (!param->obduuid && !param->quiet)
+                        if (!param->obduuid)
                                 llapi_printf(LLAPI_MSG_NORMAL,
                                              "%s has no stripe info\n", path);
                         goto out;
@@ -1963,34 +2011,7 @@ out:
 
 int llapi_getstripe(char *path, struct find_param *param)
 {
-        char *buf;
-        int ret = 0, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR,
-                          "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
-
-        ret = common_param_init(param);
-        if (ret) {
-                free(buf);
-                return ret;
-        }
-
-        param->depth = 0;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_getstripe,
-                                      cb_common_fini, param, NULL);
-        find_param_fini(param);
-        free(buf);
-        return ret < 0 ? ret : 0;
+        return param_callback(path, cb_getstripe, cb_common_fini, param);
 }
 
 int llapi_obd_statfs(char *path, __u32 type, __u32 index,
@@ -2307,35 +2328,13 @@ static int cb_quotachown(char *path, DIR *parent, DIR *d, void *data,
 int llapi_quotachown(char *path, int flag)
 {
         struct find_param param;
-        char *buf;
-        int ret = 0, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
 
         memset(&param, 0, sizeof(param));
         param.recursive = 1;
         param.verbose = 0;
         param.quiet = 1;
 
-        ret = common_param_init(&param);
-        if (ret)
-                goto out;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_quotachown,
-                                      NULL, &param, NULL);
-out:
-        find_param_fini(&param);
-        free(buf);
-        return ret;
+        return param_callback(path, cb_quotachown, NULL, &param);
 }
 
 #include <pwd.h>
@@ -2942,7 +2941,7 @@ static int path2fid_from_lma(const char *path, lustre_fid *fid)
         if (rc < 0)
                 return -errno;
         lma = (struct lustre_mdt_attrs *)buf;
-        fid_be_to_cpu(fid, &lma->lma_self_fid);
+        fid_le_to_cpu(fid, &lma->lma_self_fid);
         return 0;
 }
 
similarity index 98%
rename from lustre/utils/lreplicate.c
rename to lustre/utils/lustre_rsync.c
index f29dc73..5ef3297 100644 (file)
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
- * lustre/utils/lreplicate.c
+ * lustre/utils/lustre_rsync.c
  *
  * Author: Kalpak Shah <Kalpak.Shah@Sun.COM>
  * Author: Manoj Joseph <Manoj.Joseph@Sun.COM>
  */
 
 /*
- * - lreplicate is a tool for replicating a lustre filesystem.
+ * - lustre_rsync is a tool for replicating a lustre filesystem.
  *
  * - The source-fs is a live lustre filesystem. It is not a
  * snapshot. It is mounted and undergoing changes
@@ -51,7 +51,7 @@
  * - There is a changelog of all metadata operations that happened on
  * the filesystem since the 'sync point'.
  *
- * - lreplicate replicates all the operations saved in the changelog
+ * - lustre_rsync replicates all the operations saved in the changelog
  * on to the target filesystem to make it identical to the source.
  *
  * To facilitate replication, the lustre filesystem provides
@@ -67,7 +67,7 @@
  * With just this information, it is not alwasy possible to determine
  * the file paths for each operation. For instance, if pfid does not
  * exist on the source-fs (due to a subsequent deletion), its path
- * cannot be queried. In such cases, lreplicate keeps the files in a
+ * cannot be queried. In such cases, lustre_rsync keeps the files in a
  * special directory ("/.lustrerepl"). Once all the operations in a
  * changelog are replayed, all the files in this special directory
  * will get moved to the location as in the source-fs.
 #include <libcfs/libcfsutil.h>
 #include <lustre/liblustreapi.h>
 #include <lustre/lustre_idl.h>
-#include "lreplicate.h"
+#include "lustre_rsync.h"
 
 #define REPLICATE_STATUS_VER 1
 #define CLEAR_INTERVAL 100
@@ -174,7 +174,7 @@ struct lr_parent_child_list {
         struct lr_parent_child_list *pc_next;
 };
 
-struct lreplicate_status *status;
+struct lustre_rsync_status *status;
 char *statuslog;  /* Name of the status log file */
 int logbackedup;
 int noxattr;    /* Flag to turn off replicating xattrs */
@@ -217,11 +217,11 @@ struct option long_opts[] = {
 /* Command line usage */
 void lr_usage()
 {
-        fprintf(stderr, "\tlreplicate -s <lustre_root_path> -t <target_path> "
+        fprintf(stderr, "\tlustre_rsync -s <lustre_root_path> -t <target_path> "
                 "-m <mdt> -r <user id> -l <status log>\n"
-                "lreplicate can also pick up parameters from a "
+                "lustre_rsync can also pick up parameters from a "
                 "status log created earlier.\n"
-                "\tlreplicate -l <log_file>\n"
+                "\tlustre_rsync -l <log_file>\n"
                 "options:\n"
                 "\t--xattr <yes|no> replicate EAs\n"
                 "\t--abort-on-err   abort at first err\n"
@@ -1069,7 +1069,7 @@ int lr_parse_line(void *priv, struct lr_info *info)
 /* Initialize the replication parameters */
 int lr_init_status()
 {
-        size_t size = sizeof(struct lreplicate_status) + PATH_MAX;
+        size_t size = sizeof(struct lustre_rsync_status) + PATH_MAX;
 
         if (status != NULL)
                 return 0;
@@ -1145,10 +1145,10 @@ int lr_read_log()
 {
         struct lr_parent_child_list *tmp;
         struct lr_parent_child_log rec;
-        struct lreplicate_status *s;
+        struct lustre_rsync_status *s;
         int fd = -1;
         size_t size;
-        size_t read_size = sizeof(struct lreplicate_status) + PATH_MAX;
+        size_t read_size = sizeof(struct lustre_rsync_status) + PATH_MAX;
         int rc = 0;
 
         if (statuslog == NULL)
@@ -1464,7 +1464,7 @@ int lr_replicate()
         lr_clear_cl(info, 1);
 
         if (verbose) {
-                printf("lreplicate took %ld seconds\n", time(NULL) - start);
+                printf("lustre_rsync took %ld seconds\n", time(NULL) - start);
                 printf("Changelog records consumed: %lld\n", rec_count);
         }
 
@@ -1476,7 +1476,7 @@ termination_handler (int signum)
 {
         /* Set a flag for the replicator to gracefully shutdown */
         quit = 1;
-        printf("lreplicate halting.\n");
+        printf("lustre_rsync halting.\n");
 }
 
 int main(int argc, char *argv[])
@@ -1510,7 +1510,7 @@ int main(int argc, char *argv[])
                                    ignored. */
                                 status->ls_num_targets = numtargets;
                         }
-                        newsize = sizeof (struct lreplicate_status) +
+                        newsize = sizeof (struct lustre_rsync_status) +
                                 (status->ls_num_targets * PATH_MAX);
                         if (status->ls_size != newsize) {
                                 status->ls_size = newsize;
similarity index 91%
rename from lustre/utils/lreplicate.h
rename to lustre/utils/lustre_rsync.h
index c2623c6..a5ae267 100644 (file)
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  *
- * lustre/include/lustre/lreplicate.h
+ * lustre/include/lustre/lustre_rsync.h
  *
  */
 
-#ifndef _LREPLICATE_H_
-#define _LREPLICATE_H_
+#ifndef _LUSTRE_RSYNC_H_
+#define _LUSTRE_RSYNC_H_
 
 #define LR_NAME_MAXLEN 64
 #define LR_FID_STR_LEN 128
 
-/* Structure used by lreplicate. On-disk structures stored in a log
+/* Structure used by lustre_rsync. On-disk structures stored in a log
  * file. This is used to determine the next start record and other
  * parameters. */
 
-struct lreplicate_status {
+struct lustre_rsync_status {
         __u32   ls_version;           /* Version of the log entry */
         __u32   ls_size;              /* Size of the log entry */
         __u64   ls_last_recno;        /* Last replicated record no. */
@@ -65,4 +65,4 @@ struct lr_parent_child_log {
         char pcl_name[PATH_MAX];
 };
 
-#endif /* _LREPLICATE_H_ */
+#endif /* _LUSTRE_RSYNC_H_ */
index 4542228..e76fe96 100644 (file)
@@ -2527,99 +2527,6 @@ void obd_finalize(int argc, char **argv)
         do_disconnect(argv[0], 1);
 }
 
-static int find_target_obdpath(char *fsname, char *path)
-{
-        glob_t glob_info;
-        char pattern[PATH_MAX + 1];
-        int rc;
-
-        snprintf(pattern, PATH_MAX,
-                 "/proc/fs/lustre/lov/%s-*/target_obd",
-                 fsname);
-        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
-        if (rc == GLOB_NOMATCH)
-                return -ENODEV;
-        else if (rc)
-                return -EINVAL;
-
-        strcpy(path, glob_info.gl_pathv[0]);
-        globfree(&glob_info);
-        return 0;
-}
-
-static int find_poolpath(char *fsname, char *poolname, char *poolpath)
-{
-        glob_t glob_info;
-        char pattern[PATH_MAX + 1];
-        int rc;
-
-        snprintf(pattern, PATH_MAX,
-                 "/proc/fs/lustre/lov/%s-*/pools/%s",
-                 fsname, poolname);
-        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
-        /* If no pools, make sure the lov is available */
-        if ((rc == GLOB_NOMATCH) &&
-            (find_target_obdpath(fsname, poolpath) == -ENODEV))
-                return -ENODEV;
-        if (rc)
-                return -EINVAL;
-
-        strcpy(poolpath, glob_info.gl_pathv[0]);
-        globfree(&glob_info);
-        return 0;
-}
-
-/*
- * if pool is NULL, search ostname in target_obd
- * if pool is no NULL
- *  if pool not found returns errno < 0
- *  if ostname is NULL, returns 1 if pool is not empty and 0 if pool empty
- *  if ostname is not NULL, returns 1 if OST is in pool and 0 if not
- */
-int llapi_search_ost(char *fsname, char *poolname, char *ostname)
-{
-        FILE *fd;
-        char buffer[PATH_MAX + 1];
-        int len = 0, rc;
-
-        if (ostname != NULL)
-                len = strlen(ostname);
-
-        if (poolname == NULL)
-                rc = find_target_obdpath(fsname, buffer);
-        else
-                rc = find_poolpath(fsname, poolname, buffer);
-        if (rc)
-                return rc;
-
-        if ((fd = fopen(buffer, "r")) == NULL)
-                return -EINVAL;
-
-        while (fgets(buffer, sizeof(buffer), fd) != NULL) {
-                if (poolname == NULL) {
-                        char *ptr;
-                        /* Search for an ostname in the list of OSTs
-                           Line format is IDX: fsname-OSTxxxx_UUID STATUS */
-                        ptr = strchr(buffer, ' ');
-                        if ((ptr != NULL) &&
-                            (strncmp(ptr + 1, ostname, len) == 0)) {
-                                fclose(fd);
-                                return 1;
-                        }
-                } else {
-                        /* Search for an ostname in a pool,
-                           (or an existing non-empty pool if no ostname) */
-                        if ((ostname == NULL) ||
-                            (strncmp(buffer, ostname, len) == 0)) {
-                                fclose(fd);
-                                return 1;
-                        }
-                }
-        }
-        fclose(fd);
-        return 0;
-}
-
 static int check_pool_cmd(enum lcfg_command_type cmd,
                           char *fsname, char *poolname,
                           char *ostname)
index e5fd0f8..4b7c685 100644 (file)
@@ -64,7 +64,6 @@
 #define lustre_swab_mdt_rec_reint NULL
 #define lustre_swab_lustre_capa NULL
 #define lustre_swab_lustre_capa_key NULL
-#define lustre_swab_mdt_rec_join NULL
 #define lustre_swab_llogd_conn_body NULL
 #define lustre_swab_llog_hdr NULL
 #define lustre_swab_llogd_body NULL
 #define lustre_swab_ost_body NULL
 #define lustre_swab_ost_last_id NULL
 #define lustre_swab_fiemap NULL
+#define lustre_swab_qdata NULL
+#define lustre_swab_ost_lvb NULL
+#define dump_rniobuf NULL
+#define dump_ioo NULL
+#define dump_obdo NULL
+#define dump_ost_body NULL
+#define dump_rcs NULL
 
 /*
  * Yes, include .c file.
index f658c5e..1d6aae3 100644 (file)
@@ -332,23 +332,12 @@ check_lov_mds_md_v1(void)
         CHECK_MEMBER(lov_ost_data_v1, l_ost_idx);
 
         CHECK_CDEFINE(LOV_MAGIC_V1);
-        CHECK_CDEFINE(LOV_MAGIC_JOIN);
 
         CHECK_VALUE(LOV_PATTERN_RAID0);
         CHECK_VALUE(LOV_PATTERN_RAID1);
 }
 
 static void
-check_lov_mds_md_join(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lov_mds_md_join);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_md);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_array_id);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_extent_count);
-}
-
-static void
 check_lov_mds_md_v3(void)
 {
         BLANK_LINE();
@@ -556,116 +545,155 @@ check_mds_body(void)
 }
 
 static void
-check_mds_rec_setattr(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_setattr);
-        CHECK_MEMBER(mds_rec_setattr, sa_opcode);
-        CHECK_MEMBER(mds_rec_setattr, sa_fsuid);
-        CHECK_MEMBER(mds_rec_setattr, sa_fsgid);
-        CHECK_MEMBER(mds_rec_setattr, sa_cap);
-        CHECK_MEMBER(mds_rec_setattr, sa_suppgid);
-        CHECK_MEMBER(mds_rec_setattr, sa_mode);
-        CHECK_MEMBER(mds_rec_setattr, sa_fid);
-        CHECK_MEMBER(mds_rec_setattr, sa_valid);
-        CHECK_MEMBER(mds_rec_setattr, sa_size);
-        CHECK_MEMBER(mds_rec_setattr, sa_mtime);
-        CHECK_MEMBER(mds_rec_setattr, sa_atime);
-        CHECK_MEMBER(mds_rec_setattr, sa_ctime);
-        CHECK_MEMBER(mds_rec_setattr, sa_uid);
-        CHECK_MEMBER(mds_rec_setattr, sa_gid);
-        CHECK_MEMBER(mds_rec_setattr, sa_attr_flags);
-        CHECK_CDEFINE(MDS_ATTR_MODE);
-        CHECK_CDEFINE(MDS_ATTR_UID);
-        CHECK_CDEFINE(MDS_ATTR_GID);
-        CHECK_CDEFINE(MDS_ATTR_SIZE);
-        CHECK_CDEFINE(MDS_ATTR_ATIME);
-        CHECK_CDEFINE(MDS_ATTR_MTIME);
-        CHECK_CDEFINE(MDS_ATTR_CTIME);
-        CHECK_CDEFINE(MDS_ATTR_ATIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_MTIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_FORCE);
-        CHECK_CDEFINE(MDS_ATTR_ATTR_FLAG);
-        CHECK_CDEFINE(MDS_ATTR_KILL_SUID);
-        CHECK_CDEFINE(MDS_ATTR_KILL_SGID);
-        CHECK_CDEFINE(MDS_ATTR_CTIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_FROM_OPEN);
-        CHECK_CDEFINE(MDS_ATTR_BLOCKS);
+check_mdt_rec_setattr(void)
+{
+        BLANK_LINE();
+        CHECK_STRUCT(mdt_rec_setattr);
+        CHECK_MEMBER(mdt_rec_setattr, sa_opcode);
+        CHECK_MEMBER(mdt_rec_setattr, sa_cap);
+        CHECK_MEMBER(mdt_rec_setattr, sa_fsuid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_fsuid_h);
+        CHECK_MEMBER(mdt_rec_setattr, sa_fsgid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_fsgid_h);
+        CHECK_MEMBER(mdt_rec_setattr, sa_suppgid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_suppgid_h);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_1);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_1_h);
+        CHECK_MEMBER(mdt_rec_setattr, sa_fid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_valid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_uid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_gid);
+        CHECK_MEMBER(mdt_rec_setattr, sa_size);
+        CHECK_MEMBER(mdt_rec_setattr, sa_blocks);
+        CHECK_MEMBER(mdt_rec_setattr, sa_mtime);
+        CHECK_MEMBER(mdt_rec_setattr, sa_atime);
+        CHECK_MEMBER(mdt_rec_setattr, sa_ctime);
+        CHECK_MEMBER(mdt_rec_setattr, sa_attr_flags);
+        CHECK_MEMBER(mdt_rec_setattr, sa_mode);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_2);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_3);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_4);
+        CHECK_MEMBER(mdt_rec_setattr, sa_padding_5);
 }
 
 static void
-check_mds_rec_create(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_create);
-        CHECK_MEMBER(mds_rec_create, cr_opcode);
-        CHECK_MEMBER(mds_rec_create, cr_fsuid);
-        CHECK_MEMBER(mds_rec_create, cr_fsgid);
-        CHECK_MEMBER(mds_rec_create, cr_cap);
-        CHECK_MEMBER(mds_rec_create, cr_flags);
-        CHECK_MEMBER(mds_rec_create, cr_mode);
-        CHECK_MEMBER(mds_rec_create, cr_fid);
-        CHECK_MEMBER(mds_rec_create, cr_replayfid);
-        CHECK_MEMBER(mds_rec_create, cr_time);
-        CHECK_MEMBER(mds_rec_create, cr_rdev);
-        CHECK_MEMBER(mds_rec_create, cr_suppgid);
+check_mdt_rec_create(void)
+{
+        BLANK_LINE();
+        CHECK_STRUCT(mdt_rec_create);
+        CHECK_MEMBER(mdt_rec_create, cr_opcode);
+        CHECK_MEMBER(mdt_rec_create, cr_cap);
+        CHECK_MEMBER(mdt_rec_create, cr_fsuid);
+        CHECK_MEMBER(mdt_rec_create, cr_fsuid_h);
+        CHECK_MEMBER(mdt_rec_create, cr_fsgid);
+        CHECK_MEMBER(mdt_rec_create, cr_fsgid_h);
+        CHECK_MEMBER(mdt_rec_create, cr_suppgid1);
+        CHECK_MEMBER(mdt_rec_create, cr_suppgid1_h);
+        CHECK_MEMBER(mdt_rec_create, cr_suppgid2);
+        CHECK_MEMBER(mdt_rec_create, cr_suppgid2_h);
+        CHECK_MEMBER(mdt_rec_create, cr_fid1);
+        CHECK_MEMBER(mdt_rec_create, cr_fid2);
+        CHECK_MEMBER(mdt_rec_create, cr_old_handle);
+        CHECK_MEMBER(mdt_rec_create, cr_time);
+        CHECK_MEMBER(mdt_rec_create, cr_rdev);
+        CHECK_MEMBER(mdt_rec_create, cr_ioepoch);
+        CHECK_MEMBER(mdt_rec_create, cr_padding_1);
+        CHECK_MEMBER(mdt_rec_create, cr_mode);
+        CHECK_MEMBER(mdt_rec_create, cr_bias);
+        CHECK_MEMBER(mdt_rec_create, cr_flags);
+        CHECK_MEMBER(mdt_rec_create, cr_padding_2);
+        CHECK_MEMBER(mdt_rec_create, cr_padding_3);
+        CHECK_MEMBER(mdt_rec_create, cr_padding_4);
 }
 
 static void
-check_mds_rec_link(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_link);
-        CHECK_MEMBER(mds_rec_link, lk_opcode);
-        CHECK_MEMBER(mds_rec_link, lk_fsuid);
-        CHECK_MEMBER(mds_rec_link, lk_fsgid);
-        CHECK_MEMBER(mds_rec_link, lk_cap);
-        CHECK_MEMBER(mds_rec_link, lk_suppgid1);
-        CHECK_MEMBER(mds_rec_link, lk_suppgid2);
-        CHECK_MEMBER(mds_rec_link, lk_fid1);
-        CHECK_MEMBER(mds_rec_link, lk_fid2);
-        CHECK_MEMBER(mds_rec_link, lk_time);
-}
-
-static void
-check_mds_rec_unlink(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_unlink);
-        CHECK_MEMBER(mds_rec_unlink, ul_opcode);
-        CHECK_MEMBER(mds_rec_unlink, ul_fsuid);
-        CHECK_MEMBER(mds_rec_unlink, ul_fsgid);
-        CHECK_MEMBER(mds_rec_unlink, ul_cap);
-        CHECK_MEMBER(mds_rec_unlink, ul_suppgid);
-        CHECK_MEMBER(mds_rec_unlink, ul_mode);
-        CHECK_MEMBER(mds_rec_unlink, ul_fid1);
-        CHECK_MEMBER(mds_rec_unlink, ul_fid2);
-        CHECK_MEMBER(mds_rec_unlink, ul_time);
+check_mdt_rec_link(void)
+{
+        BLANK_LINE();
+        CHECK_STRUCT(mdt_rec_link);
+        CHECK_MEMBER(mdt_rec_link, lk_opcode);
+        CHECK_MEMBER(mdt_rec_link, lk_cap);
+        CHECK_MEMBER(mdt_rec_link, lk_fsuid);
+        CHECK_MEMBER(mdt_rec_link, lk_fsuid_h);
+        CHECK_MEMBER(mdt_rec_link, lk_fsgid);
+        CHECK_MEMBER(mdt_rec_link, lk_fsgid_h);
+        CHECK_MEMBER(mdt_rec_link, lk_suppgid1);
+        CHECK_MEMBER(mdt_rec_link, lk_suppgid1_h);
+        CHECK_MEMBER(mdt_rec_link, lk_suppgid2);
+        CHECK_MEMBER(mdt_rec_link, lk_suppgid2_h);
+        CHECK_MEMBER(mdt_rec_link, lk_fid1);
+        CHECK_MEMBER(mdt_rec_link, lk_fid2);
+        CHECK_MEMBER(mdt_rec_link, lk_time);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_1);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_2);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_3);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_4);
+        CHECK_MEMBER(mdt_rec_link, lk_bias);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_5);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_6);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_7);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_8);
+        CHECK_MEMBER(mdt_rec_link, lk_padding_9);
 }
 
 static void
-check_mds_rec_rename(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_rename);
-        CHECK_MEMBER(mds_rec_rename, rn_opcode);
-        CHECK_MEMBER(mds_rec_rename, rn_fsuid);
-        CHECK_MEMBER(mds_rec_rename, rn_fsgid);
-        CHECK_MEMBER(mds_rec_rename, rn_cap);
-        CHECK_MEMBER(mds_rec_rename, rn_suppgid1);
-        CHECK_MEMBER(mds_rec_rename, rn_suppgid2);
-        CHECK_MEMBER(mds_rec_rename, rn_fid1);
-        CHECK_MEMBER(mds_rec_rename, rn_fid2);
-        CHECK_MEMBER(mds_rec_rename, rn_time);
+check_mdt_rec_unlink(void)
+{
+        BLANK_LINE();
+        CHECK_STRUCT(mdt_rec_unlink);
+        CHECK_MEMBER(mdt_rec_unlink, ul_opcode);
+        CHECK_MEMBER(mdt_rec_unlink, ul_cap);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fsuid);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fsuid_h);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fsgid);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fsgid_h);
+        CHECK_MEMBER(mdt_rec_unlink, ul_suppgid1);
+        CHECK_MEMBER(mdt_rec_unlink, ul_suppgid1_h);
+        CHECK_MEMBER(mdt_rec_unlink, ul_suppgid2);
+        CHECK_MEMBER(mdt_rec_unlink, ul_suppgid2_h);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fid1);
+        CHECK_MEMBER(mdt_rec_unlink, ul_fid2);
+        CHECK_MEMBER(mdt_rec_unlink, ul_time);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_2);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_3);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_4);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_5);
+        CHECK_MEMBER(mdt_rec_unlink, ul_bias);
+        CHECK_MEMBER(mdt_rec_unlink, ul_mode);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_6);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_7);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_8);
+        CHECK_MEMBER(mdt_rec_unlink, ul_padding_9);
 }
 
 static void
-check_mds_rec_join(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_join);
-        CHECK_MEMBER(mds_rec_join, jr_fid);
-        CHECK_MEMBER(mds_rec_join, jr_headsize);
+check_mdt_rec_rename(void)
+{
+        BLANK_LINE();
+        CHECK_STRUCT(mdt_rec_rename);
+        CHECK_MEMBER(mdt_rec_rename, rn_opcode);
+        CHECK_MEMBER(mdt_rec_rename, rn_cap);
+        CHECK_MEMBER(mdt_rec_rename, rn_fsuid);
+        CHECK_MEMBER(mdt_rec_rename, rn_fsuid_h);
+        CHECK_MEMBER(mdt_rec_rename, rn_fsgid);
+        CHECK_MEMBER(mdt_rec_rename, rn_fsgid_h);
+        CHECK_MEMBER(mdt_rec_rename, rn_suppgid1);
+        CHECK_MEMBER(mdt_rec_rename, rn_suppgid1_h);
+        CHECK_MEMBER(mdt_rec_rename, rn_suppgid2);
+        CHECK_MEMBER(mdt_rec_rename, rn_suppgid2_h);
+        CHECK_MEMBER(mdt_rec_rename, rn_fid1);
+        CHECK_MEMBER(mdt_rec_rename, rn_fid2);
+        CHECK_MEMBER(mdt_rec_rename, rn_time);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_1);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_2);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_3);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_4); 
+        CHECK_MEMBER(mdt_rec_rename, rn_bias);
+        CHECK_MEMBER(mdt_rec_rename, rn_mode);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_5);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_6);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_7);
+        CHECK_MEMBER(mdt_rec_rename, rn_padding_8);
 }
 
 static void
@@ -1054,26 +1082,6 @@ check_llogd_conn_body(void)
 }
 
 static void
-check_mds_extent_desc(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_extent_desc);
-        CHECK_MEMBER(mds_extent_desc, med_start);
-        CHECK_MEMBER(mds_extent_desc, med_len);
-        CHECK_MEMBER(mds_extent_desc, med_lmm);
-}
-
-static void
-check_llog_array_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_array_rec);
-        CHECK_MEMBER(llog_array_rec, lmr_hdr);
-        CHECK_MEMBER(llog_array_rec, lmr_med);
-        CHECK_MEMBER(llog_array_rec, lmr_tail);
-}
-
-static void
 check_qunit_data(void)
 {
         BLANK_LINE();
@@ -1426,7 +1434,6 @@ main(int argc, char **argv)
         check_obdo();
         check_lov_mds_md_v1();
         check_lov_mds_md_v3();
-        check_lov_mds_md_join();
         check_obd_statfs();
         check_obd_ioobj();
         check_obd_quotactl();
@@ -1435,12 +1442,11 @@ main(int argc, char **argv)
         check_ll_fid();
         check_mds_status_req();
         check_mds_body();
-        check_mds_rec_setattr();
-        check_mds_rec_create();
-        check_mds_rec_link();
-        check_mds_rec_unlink();
-        check_mds_rec_rename();
-        check_mds_rec_join();
+        check_mdt_rec_setattr();
+        check_mdt_rec_create();
+        check_mdt_rec_link();
+        check_mdt_rec_unlink();
+        check_mdt_rec_rename();
         check_lov_desc();
         check_ldlm_res_id();
         check_ldlm_extent();
@@ -1472,8 +1478,6 @@ main(int argc, char **argv)
         check_llog_cookie();
         check_llogd_body();
         check_llogd_conn_body();
-        check_llog_array_rec();
-        check_mds_extent_desc();
         check_qunit_data();
         check_quota_adjust_qunit();
         check_mgs_target_info();
index 22d7e10..debda52 100644 (file)
@@ -62,8 +62,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux cfs21 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT 2008 i686 i686 i386
-         * with gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) */
+         * running on Linux vl1 2.6.18-prep #2 SMP Wed Jul 22 20:53:11 CDT 2009 x86_64 x86_64 x86_64 
+         * with gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) */
 
 
         /* Constants... */
@@ -712,7 +712,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
         CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
-        CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0);
         LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
                  (long long)LOV_PATTERN_RAID0);
         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
@@ -779,22 +778,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
                  (long long)LOV_PATTERN_RAID1);
 
-        /* Checks for struct lov_mds_md_join */
-        LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_join));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count));
-
         /* Checks for struct obd_statfs */
         LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
                  (long long)(int)sizeof(struct obd_statfs));
@@ -1191,265 +1174,493 @@ void lustre_assert_wire_constants(void)
         CLASSERT(MDS_INODELOCK_UPDATE == 0x000002);
         CLASSERT(MDS_INODELOCK_OPEN == 0x000004);
 
-        /* Checks for struct mds_rec_setattr */
-        LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_setattr));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
-        CLASSERT(MDS_ATTR_MODE == 0x1ULL);
-        CLASSERT(MDS_ATTR_UID == 0x2ULL);
-        CLASSERT(MDS_ATTR_GID == 0x4ULL);
-        CLASSERT(MDS_ATTR_SIZE == 0x8ULL);
-        CLASSERT(MDS_ATTR_ATIME == 0x10ULL);
-        CLASSERT(MDS_ATTR_MTIME == 0x20ULL);
-        CLASSERT(MDS_ATTR_CTIME == 0x40ULL);
-        CLASSERT(MDS_ATTR_ATIME_SET == 0x80ULL);
-        CLASSERT(MDS_ATTR_MTIME_SET == 0x100ULL);
-        CLASSERT(MDS_ATTR_FORCE == 0x200ULL);
-        CLASSERT(MDS_ATTR_ATTR_FLAG == 0x400ULL);
-        CLASSERT(MDS_ATTR_KILL_SUID == 0x800ULL);
-        CLASSERT(MDS_ATTR_KILL_SGID == 0x1000ULL);
-        CLASSERT(MDS_ATTR_CTIME_SET == 0x2000ULL);
-        CLASSERT(MDS_ATTR_FROM_OPEN == 0x4000ULL);
-        CLASSERT(MDS_ATTR_BLOCKS == 0x8000ULL);
-
-        /* Checks for struct mds_rec_create */
-        LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_create));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_time));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
-
-        /* Checks for struct mds_rec_link */
-        LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_link));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_time));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
-
-        /* Checks for struct mds_rec_unlink */
-        LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_unlink));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
-
-        /* Checks for struct mds_rec_rename */
-        LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_rename));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_time));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
-
-        /* Checks for struct mds_rec_join */
-        LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_join));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_headsize));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize));
+        /* Checks for struct mdt_rec_setattr */
+        LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_setattr));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_suppgid_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_suppgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_suppgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_1_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_fid) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_fid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_fid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_valid) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_valid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_valid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_uid) == 64, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_uid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_uid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_gid) == 68, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_gid));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_gid));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_size) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_size));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_size));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_blocks) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_blocks));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_blocks));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mtime) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_mtime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mtime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_atime) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_atime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_atime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_ctime) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_ctime));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_ctime));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_attr_flags) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_attr_flags));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_attr_flags));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_2) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_3) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_4) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_setattr, sa_padding_5) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_setattr, sa_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_setattr *)0)->sa_padding_5));
+
+        /* Checks for struct mdt_rec_create */
+        LASSERTF((int)sizeof(struct mdt_rec_create) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_create));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_old_handle) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_old_handle));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_time) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_time));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_rdev) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_rdev));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_rdev));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_ioepoch) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_ioepoch));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_ioepoch) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_ioepoch));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_1) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_mode) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_bias) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_flags) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_flags));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_flags) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_flags));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_2) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_3) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_3) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_create, cr_padding_4) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_create, cr_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_padding_4) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_padding_4));
+
+        /* Checks for struct mdt_rec_link */
+        LASSERTF((int)sizeof(struct mdt_rec_link) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_link));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_time));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_1) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_2) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_3) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_4) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_5) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_6) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_7) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_8) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_8));
+        LASSERTF((int)offsetof(struct mdt_rec_link, lk_padding_9) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_link, lk_padding_9));
+        LASSERTF((int)sizeof(((struct mdt_rec_link *)0)->lk_padding_9) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_link *)0)->lk_padding_9));
+
+        /* Checks for struct mdt_rec_unlink */
+        LASSERTF((int)sizeof(struct mdt_rec_unlink) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_unlink));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_time));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_2) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_3) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_4) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_5) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_5) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_6) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_7) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_8) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_8));
+        LASSERTF((int)offsetof(struct mdt_rec_unlink, ul_padding_9) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_unlink, ul_padding_9));
+        LASSERTF((int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_9) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_unlink *)0)->ul_padding_9));
+
+        /* Checks for struct mdt_rec_rename */
+        LASSERTF((int)sizeof(struct mdt_rec_rename) == 136, " found %lld\n",
+                 (long long)(int)sizeof(struct mdt_rec_rename));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_opcode) == 0, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_opcode));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_opcode));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_cap) == 4, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_cap));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_cap));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsuid) == 8, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsuid));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsuid_h) == 12, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsuid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsuid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsgid) == 16, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsgid));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fsgid_h) == 20, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fsgid_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fsgid_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid1) == 24, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid1_h) == 28, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid1_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid1_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid2) == 32, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_suppgid2_h) == 36, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_suppgid2_h));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2_h) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_suppgid2_h));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fid1) == 40, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fid1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fid1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_fid2) == 56, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_fid2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_fid2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_time) == 72, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_time));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_time) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_time));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_1) == 80, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_1));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_1) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_1));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_2) == 88, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_2));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_2) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_2));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_3) == 96, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_3));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_3) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_3));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_4) == 104, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_4));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_4) == 8, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_4));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_bias) == 112, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_bias));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_bias) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_bias));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_mode) == 116, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_mode));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_mode) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_mode));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_5) == 120, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_5));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_5) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_5));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_6) == 124, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_6));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_6) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_6));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_7) == 128, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_7));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_7) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_7));
+        LASSERTF((int)offsetof(struct mdt_rec_rename, rn_padding_8) == 132, " found %lld\n",
+                 (long long)(int)offsetof(struct mdt_rec_rename, rn_padding_8));
+        LASSERTF((int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_8) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((struct mdt_rec_rename *)0)->rn_padding_8));
 
         /* Checks for struct lov_desc */
         LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
@@ -2182,38 +2393,6 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
                  (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
 
-        /* Checks for struct llog_array_rec */
-        LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_array_rec));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_hdr));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_med));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_tail));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail));
-
-        /* Checks for struct mds_extent_desc */
-        LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_extent_desc));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_start));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_len));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_lmm));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm));
-
         /* Checks for struct qunit_data */
         LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n",
                  (long long)(int)sizeof(struct qunit_data));