* 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:
* 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
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>
AC_DEFUN([LC_CONFIG_SRCDIR],
[AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
libcfs_is_module=yes
+ldiskfs_is_ext4=no
])
#
[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])
[])
])
-# 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
#
# 2.6.17
LC_INODE_IPRIVATE
LC_DQUOTOFF_MUTEX
- LC_VFS_RENAME_MUTEX
# 2.6.18
LC_NR_PAGECACHE
#2.6.18 + RHEL5 (fc6)
LC_PG_FS_MISC
LC_PAGE_CHECKED
+ LC_LINUX_FIEMAP_H
# 2.6.19
LC_INODE_BLKSIZE
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"])
}
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;
rc = cmm_child_ops(cmm_dev)->mdo_quota.mqo_check(env,
cmm_dev->cmm_child,
- exp, type);
+ type);
RETURN(rc);
}
#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 ? */
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;
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;
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;
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;
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 ;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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*/
const value_string lustre_lov_magic[] = {
{ LOV_MAGIC_V1, "LOV_MAGIC_V1" },
- { LOV_MAGIC_JOIN, "LOV_MAGIC_JOIN" },
{0, NULL}
};
/* 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; */
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; */
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; */
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; */
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);
{ &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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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,
{ "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 }},
&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,
&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,
&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,
&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,
.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]
.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
.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
-.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
.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
.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
.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
.br
Errors: 0
.br
-lreplicate took 1 seconds
+lustre_rsync took 1 seconds
.br
Changelog records consumed: 22
.br
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
.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
.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
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 \
__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]"
* state, it must wait for the lock.
* See state diagram for details.
*/
- CLS_INTRANSIT,
+ CLS_INTRANSIT,
/**
* Lock granted, not used.
*/
*/
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;
* 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);
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);
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,
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);
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,
+++ /dev/null
-/* -*- 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 */
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)
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) \
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 */
#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
#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;
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);
#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
#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. */
* 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 */
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 */
};
/**
+ * 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 {
#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 */
#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 */
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;
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.
#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
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;
__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;
__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;
__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;
__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?)
*/
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,
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;
__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 */
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 */
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 {
/**
#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);
} 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
#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)
#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
/********* HSM **********/
+
+
+#define HSM_FLAGS_MASK 0
+
+
enum hsm_message_type {
HMT_ACTION_LIST = 100, /* message is a hsm_action_list */
};
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;
#define _LUSTRE_DEBUG_H
#include <lustre_net.h>
+#include <obd.h>
#if defined(__linux__)
#include <linux/lustre_debug.h>
}} 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);
__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)
#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>
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 {
struct interval_node *lit_root; /* actually ldlm_interval */
};
+#define LUSTRE_TRACKS_LOCK_EXP_REFS (1)
+
struct ldlm_lock {
/**
* Must be first in the structure.
*/
__u32 l_lvb_len;
void *l_lvb_data;
- void *l_lvb_swabber;
void *l_ast_data;
spinlock_t l_extents_list_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 {
}
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;
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
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,
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,
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,
#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;
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;
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;
/* 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
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 */
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);
#include <lustre/lustre_idl.h>
#include <lvfs.h>
#include <obd_support.h>
-#include <class_hash.h>
struct obd_device;
struct client_obd;
/** 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;
/** @{ */
/**
* 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
#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)
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);
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);
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;
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;
struct lustre_capa *mc_capa[MD_CAPAINFO_MAX];
};
+struct md_quota {
+ struct obd_export *mq_exp;
+};
+
/**
* Implemented in mdd/mdd_handler.c.
*
*/
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 {
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 {
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;
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 */
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,
#include <lustre_quota.h>
#include <lustre_fld.h>
#include <lustre_capa.h>
-#include <class_hash.h>
#include <libcfs/bitmap.h>
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 */
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];
};
__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;
* (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;
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 */
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! */
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,
};
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:
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
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); \
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); \
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 *,
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;
{
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);
}
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
#
# 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
# 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
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
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
# 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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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
# 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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
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
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
#
# 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
# 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
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
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
# 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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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
# 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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
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
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
#
# 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"
# 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
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
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
# 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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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
# 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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
#
# 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"
# 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
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
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
# 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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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
# 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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
#
# 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
# 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
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
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
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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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_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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
CONFIG_EDAC_E752X=m
CONFIG_EDAC_I3000=m
CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
CONFIG_EDAC_K8=m
CONFIG_EDAC_POLL=y
#
# 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
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
# 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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
#
# 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
# 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
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
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
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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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_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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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)
CONFIG_EDAC_E752X=m
CONFIG_EDAC_I3000=m
CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
CONFIG_EDAC_K8=m
CONFIG_EDAC_POLL=y
#
# 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
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
# 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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
#
# 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
# 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
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
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
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
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
# 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
# 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
# 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
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
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
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
# 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)
#
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
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
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
# 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
# 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
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
# 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
# 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
# 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
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
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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
# 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
# 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
# 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
# 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
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
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
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
#
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
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
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
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
#
# 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
# 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
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
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
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
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
# 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
# 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
# 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
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
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
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
# 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)
#
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
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
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
# 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
# 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
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
# 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
# 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
# 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
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
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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
# 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
# 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
# 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
# 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
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
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
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
#
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
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
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
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
#
# 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"
# 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
# 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
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
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
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
# 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
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
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
# 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)
#
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
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
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
# 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
# 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
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
# 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
# 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
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
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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
# 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
# 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
# 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
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
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
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
#
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
#
# 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"
# 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
# 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
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
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
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
# 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
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
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
# 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)
#
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
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
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
# 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
# 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
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
# 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
# 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
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
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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
# 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
# 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
# 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
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
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
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
#
#
# 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
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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
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
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)
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
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)
#
# 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
# 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
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
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
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
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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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_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
# 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
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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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
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
#
CONFIG_EDAC_E752X=m
CONFIG_EDAC_I3000=m
CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
CONFIG_EDAC_K8=m
CONFIG_EDAC_POLL=y
#
# 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
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
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
# 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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
#
# 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
# 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
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
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
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
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
# 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_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
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
# 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)
#
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
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
CONFIG_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
# 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
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_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
# 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
# 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
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
+CONFIG_CNIC=m
CONFIG_QLA3XXX=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
# 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
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
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
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
#
CONFIG_EDAC_E752X=m
CONFIG_EDAC_I3000=m
CONFIG_EDAC_I5000=m
+CONFIG_EDAC_I5400=m
CONFIG_EDAC_K8=m
CONFIG_EDAC_POLL=y
#
# 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
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
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
# 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
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
+CONFIG_FUSE_FS=m
#
# Caches
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
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
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
{
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);
- } 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,
+ * 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 *);
--- 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);
--- 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);
+
#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();
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=""
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=""
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=""
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
*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
* 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);
/*
* 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;
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);
}
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);
}
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);
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,
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;
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;
/* 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);
}
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);
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)
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++;
}
libcfs_nid2str(req->rq_peer.nid));
handle_recovery_req(thread, req,
trd->trd_recovery_handler);
+ target_request_copy_put(req);
obd->obd_replayed_locks++;
}
libcfs_nid2str(req->rq_peer.nid));
handle_recovery_req(thread, req,
trd->trd_recovery_handler);
+ target_request_copy_put(req);
}
delta = (jiffies - delta) / HZ;
{
#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;
}
/* 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;
EXIT;
out:
+ if (master_obd)
+ obd_unpin_observer(lov_obd);
+ if (lov_obd)
+ obd_unpin_observer(obd);
+
rc = ptlrpc_reply(req);
return rc;
#else
}
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
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;
}
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);
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);
}
int ast_count;
ENTRY;
+ if (list_empty(rpc_list))
+ RETURN(0);
+
arg.set = ptlrpc_prep_set();
if (NULL == arg.set)
RETURN(-ERESTART);
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);
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);
}
/**
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()
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);
* 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");
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)
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);
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:
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;
}
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);
}
}
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);
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;
* 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 *
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)
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);
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;
}
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;
}
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)
{
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;
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;
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)
/* 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;
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);
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;
/* 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
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 */
/* 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);
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;
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 {
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;
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;
}
{
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);
}
* 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);
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;
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)
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));
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);
}
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) {
#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;
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;
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);
}
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;
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);
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);
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
*
* 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);
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);
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:
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)
{
.getxattr = ll_getxattr,
.listxattr = ll_listxattr,
.removexattr = ll_removexattr,
+#ifdef HAVE_LINUX_FIEMAP_H
+ .fiemap = ll_fiemap,
+#endif
};
/* dynamic ioctl number support routins */
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;
#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 */
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);
*/
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.
*/
} 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;
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)
}
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)
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;
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);
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. */
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;
}
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);
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();
}
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)
}
}
- 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);
}
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);
} /* 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;
}
/**
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;
}
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.
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);
}
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);
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);
}
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;
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);
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);
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);
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,
int result;
LASSERT(cio->u.trunc.cui_locks_released);
- LASSERT(vio->cui_oneshot == 0);
LOCK_INODE_MUTEX(inode);
DOWN_WRITE_I_ALLOC_SEM(inode);
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);
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);
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
int rc;
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
- LASSERT(cl2vvp_io(env, ios)->cui_oneshot == 0);
LASSERT(slice->cpl_obj == obj);
ENTRY;
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) {
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)
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);
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);
LLT_EMPTY,
/** striped file */
LLT_RAID0,
- /** join file */
- LLT_JOIN,
LLT_NR
};
} 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
*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)
{
.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)
{
.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,
};
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 */
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);
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;
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) {
* 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;
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
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;
result = PTR_ERR(sublock);
break;
}
+ cl_lock_get_trust(sublock);
cl_lock_mutex_get(env, sublock);
cl_lock_mutex_get(env, parent);
/*
"lov-parent", parent);
}
cl_lock_mutex_put(env, sublock);
+ cl_lock_put(env, sublock);
}
}
/*
}
/**
+ *
+ * \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.
*
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 */
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);
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)
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) {
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)
{
.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
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);
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);
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,
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;
.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,
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;
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);
}
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;
}
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);
{
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);
/* 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;
}
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);
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:
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));
}
* 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;
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
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);
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);
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);
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);
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);
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
{
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;
}
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;
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:
}
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);
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();
}
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,
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;
}
/* 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)
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;
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;
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) {
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);
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))
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;
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);
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);
}
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;
}
/* 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,
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 };
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);
}
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);
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 };
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 {
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 };
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);
}
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 };
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:
/* 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
#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 };
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);
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,
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);
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);
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;
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)
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)))
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);
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)
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 };
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);
}
}
}
+ 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,
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;
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:
}
/* 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
}
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;
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);
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)
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);
}
{
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;
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:
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;
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);
}
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;
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);
}
}
- 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));
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;
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;
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;
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);
}
/*
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);
}
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;
}
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));
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);
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;
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, "
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);
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);
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 {
* 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);
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;
{
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));
}
/* 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"). */
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);
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;
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
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
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);
* 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;
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 */
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;
}
* ->{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;
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
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;
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);
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);
}
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 {
}
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;
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);
}
/**
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) {
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);
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) {
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);
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;
}
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,
LASSERT(result != -ENOSYS);
} while (result == CLO_REPEAT);
- return result ?: lock->cll_error;
+ return result;
}
/**
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) {
}
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;
/* @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;
int result;
ENTRY;
+ cl_lock_trace(D_DLMTRACE, env, "enqueue lock", lock);
do {
result = 0;
} 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));
*
* 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)
*
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
* 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);
/*
*/
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);
}
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;
}
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));
}
}
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);
}
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);
} 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);
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));
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
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);
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
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);
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
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 &&
/*
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);
*/
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);
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);
{
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);
}
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);
#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>
*/
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;
} 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
}
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;
}
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);
}
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);
{
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;
}
}
if (result)
- lustre_hash_exit(cl_env_hash);
+ cfs_hash_destroy(cl_env_hash);
return result;
}
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);
}
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);
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
+++ /dev/null
-/* -*- 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);
#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)
{
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)
{
}
#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);
#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;
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);
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);
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);
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);
}
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
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);
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)
{
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);
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;
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",
}
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;
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);
"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);
__swab32s(&lid->lid_id.lgl_ogen);
break;
}
- case LLOG_JOIN_REC:
case LLOG_PAD_MAGIC:
break;
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 {
"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",
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);
*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);
}
{
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);
}
}
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);
}
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,
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));
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);
}
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);
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;
}
int class_handle_init(void)
{
struct handle_bucket *bucket;
+ struct timeval tv;
+ int seed[2];
LASSERT(handle_hash == NULL);
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);
#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 *********/
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);
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);
}
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;
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;
}
*/
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 *
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,
};
*/
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 *
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,
};
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,
};
.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,
};
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);
struct list_head el_chain;
struct echo_object *el_object;
__u64 el_cookie;
+ atomic_t el_refcount;
};
struct echo_io {
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);
}
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)
{
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);
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;
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,
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))
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),
/* 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;
}
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;
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
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);
*
* 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);
}
* 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;
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);
}
((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.*/
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);
}
/* 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;
* 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;
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");
*
* 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);
}
* 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;
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);
}
}
*
* 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;
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;
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);
}
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);
}
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)
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;
};
* 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.
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;
}
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);
{
struct ptlrpc_request *request;
struct ost_body *body;
- __u32 size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
ENTRY;
LASSERT_SPIN_LOCKED(&oscc->oscc_lock);
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;
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;
/* 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;
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.
*/
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) {
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;
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;
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);
* 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,
* 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);
* 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;
}
/**
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)
/*
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
* 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;
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.
*
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.
*
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. */
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);
}
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;
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;
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,
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);
}
/*
* 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);
{
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;
}
{
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;
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;
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,
/* 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,
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.
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);
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]);
}
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);
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);
}
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))
}
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) &&
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);
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);
/* 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);
*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;
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);
/* 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);
(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;
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;
}
(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);
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);
}
{
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);
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);
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;
RETURN(0);
}
-/*
+/**
* Helper function for ost_punch(): if asked by client, acquire [size, EOF]
* lock on the file being truncated.
*/
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.
*/
{
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;
/* 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;
(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 &&
*/
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);
}
{
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);
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);
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 +
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,
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;
/* 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);
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);
}
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;
/* 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
}
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)) {
/* 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;
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)) {
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);
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) {
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);
}
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)
{
/* 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)
}
/**
- * 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)
{
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)
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)
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));
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);
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);
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);
}
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));
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))
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){
/* 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){
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))
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);
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
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));
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)
#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,
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);
* 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;
{
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);
void ptlrpc_connection_fini(void) {
ENTRY;
- lustre_hash_exit(conn_hash);
+ cfs_hash_destroy(conn_hash);
EXIT;
}
* 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
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,
};
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);
}
*
* 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
};
&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,
&RMF_CAPA1,
&RMF_CAPA2,
&RMF_NAME,
- &RMF_EADATA,
- &RMF_REC_JOINFILE
+ &RMF_EADATA
};
static const struct req_msg_field *ldlm_intent_unlink_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[] = {
__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;
/*
* 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);
/*
*/
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);
/*
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);
#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;
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
}
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;
}
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,
{
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);
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)
{
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;
}
}
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;
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)
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);
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)
(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.
*/
}
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,
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;
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;
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));
}
/*
}
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)
}
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)
}
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,
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,
__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);
}
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);
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);
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;
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)
{
__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;
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);
/**
* 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;
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;
}
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)
{
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());
}
timeout_cb_t cb, void *data)
{
struct timeout_item *ti;
-
+
OBD_ALLOC_PTR(ti);
if (!ti)
return(NULL);
ti->ti_event = event;
ti->ti_cb = cb;
ti->ti_cb_data = data;
-
+
return ti;
}
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,
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);
/**
}
mutex_up(&pinger_sem);
return 0;
-}
+}
int ptlrpc_pinger_remove_timeouts(void)
{
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)
{
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);
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);
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);
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() >
/* 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);
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) ||
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 */
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);
CERROR("cannot start %s thread #%d: rc %d\n",
svc->srv_thread_name, i, rc);
ptlrpc_stop_all_threads(svc);
+ break;
}
}
RETURN(rc);
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))
{
/* 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... */
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",
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));
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",
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));
#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
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)
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));
#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 */
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);
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);
* 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;
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 */
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)
{
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
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;
LQUOTA_WAIT_FOR_CHK_INO,
timediff);
+ if (rc > 0)
+ rc = 0;
RETURN(rc);
}
{
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;
$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();
!$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>)) {
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
[ "$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
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
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}
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
}
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;
}
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
change_active $SINGLEMDS
reboot_facet $SINGLEMDS
- client_df &
+ clients_up &
DFPID=$!
sleep 5
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`"
#Check FS
echo "Test Lustre stability after MDS failover"
- client_df
+ clients_up
#CLIENT Portion
echo "Failing 2 CLIENTS"
#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`"
#Check FS
echo "Test Lustre stability after OST failure"
- client_df &
+ clients_up &
DFPIDA=$!
sleep 5
change_active $SINGLEMDS
reboot_facet $SINGLEMDS
- client_df &
+ clients_up &
DFPIDB=$!
sleep 5
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`"
###################################################
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
#Check FS
echo "Test Lustre stability after OST failure"
- client_df &
+ clients_up &
DFPIDA=$!
sleep 5
#Check FS
echo "Test Lustre stability after OST failure"
- client_df &
+ clients_up &
DFPIDB=$!
sleep 5
wait $DFPIDA
wait $DFPIDB
- client_df || return 2
+ clients_up || return 2
}
run_test 5 "Fifth Failure Mode: OST/OST `date`"
###################################################
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
#Check FS
echo "Test Lustre stability after OST failure"
- client_df &
+ clients_up &
DFPIDA=$!
echo DFPIDA=$DFPIDA
sleep 5
#Check FS
echo "Test Lustre stability after CLIENTs failure"
- client_df &
+ clients_up &
DFPIDB=$!
echo DFPIDB=$DFPIDB
sleep 5
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`"
###################################################
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
#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"
echo "Verify Lustre filesystem is up and running"
[ -z "$(mounted_lustre_filesystems)" ] && return 2
- client_df
+ clients_up
client_rm testfile
#MDS Portion
#Reintegration
echo "Reintegrating CLIENTs"
reintegrate_clients || return 2
- client_df
+ clients_up
#Sleep
echo "wait 1 minutes"
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
#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"
echo "Verify Lustre filesystem is up and running"
[ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
- client_df
+ clients_up
client_touch testfile
#Check FS
echo "Test Lustre stability after OST failure"
- client_df &
+ clients_up &
DFPID=$!
sleep 5
#non-failout hangs forever here
wait_for ost1
start_ost 1
wait $DFPID
- client_df || return 1
+ clients_up || return 1
client_touch testfile2 || return 2
#Sleep
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
#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
#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
#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"
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!
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)}
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
}
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
# 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
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 \
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
$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
$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"
# 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
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
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
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
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
$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
sleep 1;
done
- $LREPLICATE -l $LREPL_LOG
+ $LRSYNC -l $LREPL_LOG
check_diff $DIR/$tdir $TGT/$tdir
check_diff $DIR/$tdir $TGT2/$tdir
}
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
# 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
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
# 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
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
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
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
# 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
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() {
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
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);
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);
}
}
#define POP_ARG() (pop_arg(argc, argv))
-#define min(a,b) ((a)>(b)?(b):(a))
int main(int argc, char **argv)
{
#!/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.
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
}
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" ""\
}
create_pool_nofail() {
- create_pool $1
+ create_pool $FSNAME.$1
if [[ $? != 0 ]]
then
error "Pool creation of $1 failed"
}
create_pool_fail() {
- create_pool $1
+ create_pool $FSNAME.$1
if [[ $? == 0 ]]
then
error "Pool creation of $1 succeeded; should have failed"
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
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
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."
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."
}
[[ $? -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."
}
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
[[ $? -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."
}
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 ==============================="
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
[[ $? -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"
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"
[[ $? -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
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
# 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."
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
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
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
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
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 || \
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
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
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
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
$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
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
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
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
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
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
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; }
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
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
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)
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)
#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
}
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
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
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
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"
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
facet_failover $SINGLEMDS
sleep $TIMEOUT
- facet_failover $SINGLEMDS
- df $MOUNT || return 1
+ fail $SINGLEMDS
unlinkmany $MOUNT1/$tfile- 25 || return 2
facet_failover ost1
sleep $TIMEOUT
- facet_failover ost1
- df $MOUNT || return 1
+ fail ost1
unlinkmany $MOUNT1/$tfile- 25 || return 2
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))
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))
# 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"
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 }'`
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
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
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
}
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}'`
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
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
# 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.
# 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
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
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"
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"
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"
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
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
}
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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"
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"
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
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
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
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
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"
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
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
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
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"
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
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
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
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
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
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`
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"
$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
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!
# 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} ;;
# 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}": " | \
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() {
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 =================="
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) ===="
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
}
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
}
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
}
#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
}
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
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
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"
[ "$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."
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
}
}
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
}
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
}
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
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 ===================================="
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`
}
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
# 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"
}
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
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/* ]] || \
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
fail() {
facet_failover $* || error "failover: $?"
- client_df || error "post-failover df: $?"
+ clients_up || error "post-failover df: $?"
}
fail_nodf() {
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() {
$LFS quotaoff -ug $MOUNT > /dev/null 2>&1
fi
fi
+
+ return 0
}
nfs_client_mode () {
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 | \
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
error() {
error_noexit "$@"
- $FAIL_ON_ERROR && exit 1 || true
+ if $FAIL_ON_ERROR; then
+ reset_fail_loc
+ exit 1
+ fi
}
error_exit() {
*) 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
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
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 () {
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
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)
"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"
"\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"
{"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':
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;
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], ¶m);
while (llapi_search_mounts(NULL, index++, mntdir, NULL) == 0) {
memset(¶m, 0, sizeof(param));
- rc = llapi_getstripe(mntdir, ¶m);
+ rc = llapi_ostlist(mntdir, ¶m);
if (rc) {
fprintf(stderr, "error: %s: failed on %s\n",
argv[0], mntdir);
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
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,
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) {
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 */
{
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;
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;
/* 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;
}
}
/* 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) {
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);
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) {
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);
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) {
}
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",
}
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,
}
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");
}
lov_dump_user_lmm_v1v3(¶m->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(¶m->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];
objects = lmmv3->lmm_objects;
lov_dump_user_lmm_v1v3(¶m->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 *)¶m->lmd->lmd_lmm,
- LOV_USER_MAGIC_V1, LOV_USER_MAGIC_JOIN,
- LOV_USER_MAGIC_V3);
+ LOV_USER_MAGIC_V1, LOV_USER_MAGIC_V3);
return;
}
}
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.
*
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,
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;
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;
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,
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(¶m, 0, sizeof(param));
param.recursive = 1;
param.verbose = 0;
param.quiet = 1;
- ret = common_param_init(¶m);
- if (ret)
- goto out;
-
- strncpy(buf, path, PATH_MAX + 1);
- ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_quotachown,
- NULL, ¶m, NULL);
-out:
- find_param_fini(¶m);
- free(buf);
- return ret;
+ return param_callback(path, cb_quotachown, NULL, ¶m);
}
#include <pwd.h>
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;
}
* 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
* - 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
* 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
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 */
/* 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"
/* 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;
{
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)
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);
}
{
/* 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[])
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;
* 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. */
char pcl_name[PATH_MAX];
};
-#endif /* _LREPLICATE_H_ */
+#endif /* _LUSTRE_RSYNC_H_ */
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)
#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.
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();
}
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
}
static void
-check_mds_extent_desc(void)
-{
- BLANK_LINE();
- CHECK_STRUCT(mds_extent_desc);
- CHECK_MEMBER(mds_extent_desc, med_start);
- CHECK_MEMBER(mds_extent_desc, med_len);
- CHECK_MEMBER(mds_extent_desc, med_lmm);
-}
-
-static void
-check_llog_array_rec(void)
-{
- BLANK_LINE();
- CHECK_STRUCT(llog_array_rec);
- CHECK_MEMBER(llog_array_rec, lmr_hdr);
- CHECK_MEMBER(llog_array_rec, lmr_med);
- CHECK_MEMBER(llog_array_rec, lmr_tail);
-}
-
-static void
check_qunit_data(void)
{
BLANK_LINE();
check_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();
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();
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();
{
/* 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... */
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",
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));
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",
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));