From 2e6f5c160a4acdd509ca7b4245e96ed83b19bb57 Mon Sep 17 00:00:00 2001 From: fanyong Date: Wed, 4 Nov 2009 05:29:17 +0000 Subject: [PATCH] b=19200 i=tom.wang i=oleg.drokin i=adilger Drop join file, do not support it any more. --- lustre/ChangeLog | 6 +- lustre/contrib/packet-lustre.c | 601 +---------------------------------- lustre/include/linux/lustre_fsfilt.h | 1 - lustre/include/lustre/lustre_idl.h | 81 +---- lustre/include/lustre/lustre_user.h | 3 +- lustre/include/lustre_mds.h | 2 - lustre/include/lustre_req_layout.h | 1 - lustre/include/obd.h | 25 -- lustre/include/obd_class.h | 14 - lustre/llite/dir.c | 11 +- lustre/llite/file.c | 246 +------------- lustre/llite/llite_internal.h | 1 - lustre/llite/llite_lib.c | 51 +-- lustre/llite/namei.c | 4 - lustre/lov/lov_cl_internal.h | 4 - lustre/lov/lov_ea.c | 400 ----------------------- lustre/lov/lov_internal.h | 5 - lustre/lov/lov_obd.c | 21 +- lustre/lov/lov_offset.c | 25 +- lustre/lov/lov_pack.c | 9 - lustre/lov/lovsub_lock.c | 3 - lustre/lvfs/fsfilt_ext3.c | 13 - lustre/mdc/mdc_internal.h | 2 - lustre/mdc/mdc_lib.c | 14 - lustre/mdc/mdc_locks.c | 27 +- lustre/mdd/mdd_lov.c | 10 - lustre/mds/mds_log.c | 6 - lustre/mdt/mdt_open.c | 5 +- lustre/obdclass/llog_swab.c | 1 - lustre/obdclass/lprocfs_status.c | 5 +- lustre/ptlrpc/layout.c | 8 +- lustre/ptlrpc/pack_generic.c | 39 --- lustre/ptlrpc/ptlrpc_module.c | 3 - lustre/ptlrpc/wiretest.c | 62 +--- lustre/tests/sanity-nano.sh | 3 +- lustre/tests/sanity.sh | 111 +------ lustre/tests/sanityN.sh | 21 -- lustre/utils/lfs.c | 38 +-- lustre/utils/liblustreapi.c | 71 +---- lustre/utils/req-layout.c | 1 - lustre/utils/wirecheck.c | 32 -- lustre/utils/wiretest.c | 62 +--- 42 files changed, 61 insertions(+), 1987 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 78be1f8..f1fff09 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -13,7 +13,11 @@ tbd Sun Microsystems, Inc. * Note that reiserfs quotas are disabled on SLES 10 in this kernel. * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a removed cwd "./" (refer to Bugzilla 14399). - * File join has been disabled in this release, refer to Bugzilla 16929. + +Severity : normal +Frequency : cleanup +Bugzilla : 19200 +Description: drop join file stuff. Severity : enhancement Bugzilla : 14250 diff --git a/lustre/contrib/packet-lustre.c b/lustre/contrib/packet-lustre.c index fd58ecc..32ed8e6 100644 --- a/lustre/contrib/packet-lustre.c +++ b/lustre/contrib/packet-lustre.c @@ -74,7 +74,7 @@ #define LOV_MAGIC_V1 0x0BD10BD0 #define LOV_MAGIC LOV_MAGIC_V1 -#define LOV_MAGIC_JOIN 0x0BD20BD0 +#define LOV_MAGIC_JOIN_V1 0x0BD20BD0 typedef enum { OST_REPLY = 0, /* reply ? */ @@ -270,7 +270,7 @@ typedef enum { OBD_CFG_REC = LLOG_OP_MAGIC | 0x20000, PTL_CFG_REC = LLOG_OP_MAGIC | 0x30000, /* obsolete */ LLOG_GEN_REC = LLOG_OP_MAGIC | 0x40000, - LLOG_JOIN_REC = LLOG_OP_MAGIC | 0x50000, + LLOG_JOIN_REC = LLOG_OP_MAGIC | 0x50000, /* obsolete */ LLOG_HDR_MAGIC = LLOG_OP_MAGIC | 0x45539, LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b, } llog_op_type; @@ -311,7 +311,6 @@ static gint ett_lustre_obd_dqblk = -1; static gint ett_lustre_quota_adjust_qunit = -1; static gint ett_lustre_mds_rec_setattr = -1; static gint ett_lustre_mds_rec_create = -1; -static gint ett_lustre_mds_rec_join = -1; static gint ett_lustre_mds_rec_link = -1; static gint ett_lustre_mds_rec_unlink = -1; static gint ett_lustre_mds_rec_rename = -1; @@ -331,14 +330,11 @@ static gint ett_lustre_mgs_send_param = -1; static gint ett_lustre_mgs_target_info = -1; static gint ett_lustre_cfg_marker = -1; static gint ett_lustre_llog_catid = -1; -static gint ett_lustre_lov_mds_md_join = -1; static gint ett_lustre_llog_rec_hdr = -1; static gint ett_lustre_llog_logid_rec = -1; static gint ett_lustre_llog_logid = -1; static gint ett_lustre_llog_rec_tail = -1; static gint ett_lustre_lov_mds_md = -1; -static gint ett_lustre_llog_array_rec = -1; -static gint ett_lustre_mds_extent_desc = -1; static gint ett_lustre_llog_create_rec = -1; static gint ett_lustre_llog_orphan_rec = -1; static gint ett_lustre_llog_unlink_rec = -1; @@ -350,8 +346,6 @@ static gint ett_lustre_llog_cookie = -1; static gint ett_lustre_llogd_body = -1; static gint ett_lustre_llogd_conn_body = -1; static gint ett_lustre_llog_gen = -1; -static gint ett_lustre_lov_user_md_join = -1; -static gint ett_lustre_lov_user_ost_data_join = -1; static gint ett_lustre_obdo = -1; static gint ett_lustre_ost_body = -1; static gint ett_lustre_qunit_data = -1; @@ -376,7 +370,6 @@ static int hf_lustre_mds_rec_unlink = -1 ; static int hf_lustre_obd_uuid = -1 ; static int hf_lustre_obd_connect_data = -1 ; static int hf_lustre_ldlm_intent = -1; -static int hf_lustre_lov_user_md_join = -1 ; static int hf_lustre_obd_ioobj = -1 ; static int hf_lustre_niobuf_remote = -1 ; static int hf_lustre_ost_key = -1 ; @@ -396,7 +389,6 @@ static int hf_lustre_llog_cookie= -1; static int hf_lustre_mds_md_data= -1; static int hf_lustre_mds_reint_opcode= -1; static int hf_lustre_mds_xattr_eadata = -1; -static int hf_lustre_lov_mds_md_join = -1 ; static int hf_lustre_reint_name= -1; static int hf_lustre_reint_old_name= -1; @@ -575,7 +567,6 @@ static int hf_lustre_ldlm_reply_lock_policy_res1 = -1; static int hf_lustre_mds_rec_link_lk_fsuid = -1; static int hf_lustre_llogd_body_lgd_len = -1; static int hf_lustre_qunit_data_old_qd_id = -1; -static int hf_lustre_lov_user_md_join_lmm_stripe_count = -1; static int hf_lustre_llog_logid_rec_padding1 = -1; static int hf_lustre_quota_adjust_qunit_padding1 = -1; static int hf_lustre_llog_size_change_rec_lsc_fid = -1; @@ -601,7 +592,6 @@ static int hf_lustre_llog_logid_lgl_oid = -1; static int hf_lustre_ldlm_inodebits_bits = -1; static int hf_lustre_llog_log_hdr_llh_count = -1; static int hf_lustre_mds_rec_unlink_ul_padding_4 = -1; -static int hf_lustre_lov_user_md_join_lmm_stripe_size = -1; static int hf_lustre_llog_gen_rec_lgr_tail = -1; static int hf_lustre_llog_catid_lci_padding3 = -1; static int hf_lustre_qunit_data_qd_qunit = -1; @@ -610,7 +600,6 @@ static int hf_lustre_llog_setattr_rec_padding = -1; static int hf_lustre_mds_rec_rename_rn_opcode = -1; static int hf_lustre_mds_rec_create_cr_flags = -1; static int hf_lustre_mds_rec_rename_rn_fid1 = -1; -static int hf_lustre_mds_extent_desc_med_start = -1; static int hf_lustre_llog_cookie_lgc_lgl = -1; static int hf_lustre_obd_quotactl_qc_dqinfo = -1; static int hf_lustre_llog_log_hdr_llh_bitmap = -1; @@ -623,7 +612,6 @@ static int hf_lustre_mds_rec_unlink_ul_mode = -1; static int hf_lustre_llog_orphan_rec_lor_tail = -1; static int hf_lustre_llog_logid_rec_padding5 = -1; static int hf_lustre_mds_rec_create_cr_fsgid = -1; -static int hf_lustre_mds_rec_join_jr_fid = -1; static int hf_lustre_ldlm_intent_opc = -1; static int hf_lustre_llog_rec_hdr_lrh_type = -1; static int hf_lustre_mds_rec_link_lk_fsgid = -1; @@ -643,8 +631,6 @@ static int hf_lustre_ldlm_extent_start = -1; static int hf_lustre_mds_rec_unlink_ul_opcode = -1; static int hf_lustre_llog_size_change_rec_lsc_hdr = -1; static int hf_lustre_mds_rec_unlink_ul_time = -1; -static int hf_lustre_lov_user_ost_data_join_l_extent_start = -1; -static int hf_lustre_lov_user_md_join_lmm_tree_id = -1; static int hf_lustre_llog_create_rec_lcr_tail = -1; static int hf_lustre_mds_rec_setattr_sa_mode = -1; static int hf_lustre_llog_logid_lgl_ogr = -1; @@ -657,7 +643,6 @@ static int hf_lustre_mds_rec_setattr_sa_gid = -1; static int hf_lustre_lov_desc_ld_pattern = -1; static int hf_lustre_qunit_data_qd_id = -1; static int hf_lustre_mgs_target_info_mti_fsname = -1; -static int hf_lustre_lov_user_md_join_lmm_object_gr = -1; static int hf_lustre_ldlm_request_lock_flags = -1; static int hf_lustre_obdo_o_mode = -1; static int hf_lustre_mgs_target_info_mti_svname = -1; @@ -673,12 +658,9 @@ static int hf_lustre_mds_rec_create_cr_replayfid = -1; static int hf_lustre_ldlm_lock_desc_l_policy_data = -1; static int hf_lustre_mds_rec_link_lk_suppgid1 = -1; static int hf_lustre_obd_quotactl_qc_cmd = -1; -static int hf_lustre_lov_user_md_join_lmm_object_id = -1; static int hf_lustre_mds_rec_rename_rn_padding_3 = -1; static int hf_lustre_qunit_data_padding = -1; -static int hf_lustre_lov_user_md_join_lmm_objects = -1; static int hf_lustre_quota_adjust_qunit_qaq_flags = -1; -static int hf_lustre_lov_user_ost_data_join_l_object_gr = -1; static int hf_lustre_ldlm_lock_desc_l_granted_mode = -1; static int hf_lustre_obdo_o_gr = -1; static int hf_lustre_mds_rec_unlink_ul_padding_2 = -1; @@ -686,7 +668,6 @@ static int hf_lustre_obdo_o_gid = -1; static int hf_lustre_llog_catid_lci_logid = -1; static int hf_lustre_llog_rec_tail_lrt_index = -1; static int hf_lustre_obdo_o_mds = -1; -static int hf_lustre_mds_extent_desc_med_lmm = -1; static int hf_lustre_lov_desc_ld_default_stripe_count = -1; static int hf_lustre_ldlm_resource_desc_lr_padding = -1; static int hf_lustre_cfg_marker_cm_vers = -1; @@ -696,13 +677,10 @@ static int hf_lustre_llogd_body_lgd_index = -1; static int hf_lustre_cfg_marker_cm_tgtname = -1; static int hf_lustre_mds_rec_unlink_ul_padding_1 = -1; static int hf_lustre_mds_rec_unlink_ul_cap = -1; -static int hf_lustre_llog_array_rec_lmr_med = -1; static int hf_lustre_llog_setattr_rec_lsr_ogen = -1; static int hf_lustre_mds_rec_create_cr_padding_3 = -1; static int hf_lustre_llog_logid_rec_lid_hdr = -1; -static int hf_lustre_lov_user_ost_data_join_l_ost_idx = -1; static int hf_lustre_obdo_o_easize = -1; -static int hf_lustre_lov_user_md_join_lmm_array_id = -1; static int hf_lustre_ost_body_oa = -1; static int hf_lustre_llog_logid_rec_padding3 = -1; static int hf_lustre_llog_log_hdr_llh_flags = -1; @@ -712,14 +690,12 @@ static int hf_lustre_llog_size_change_rec_padding = -1; static int hf_lustre_mgs_target_info_mti_config_ver = -1; static int hf_lustre_cfg_marker_cm_createtime = -1; static int hf_lustre_qunit_data_old_qd_count = -1; -static int hf_lustre_lov_mds_md_join_lmmj_array_id = -1; static int hf_lustre_mds_rec_setattr_sa_uid = -1; static int hf_lustre_llog_catid_lci_padding1 = -1; static int hf_lustre_mds_rec_setattr_sa_atime = -1; static int hf_lustre_lov_desc_ld_active_tgt_count = -1; static int hf_lustre_obdo_o_lcookie = -1; static int hf_lustre_llog_gen_rec_lgr_gen = -1; -static int hf_lustre_lov_user_ost_data_join_l_object_id = -1; static int hf_lustre_obdo_o_id = -1; static int hf_lustre_mgs_target_info_mti_uuid = -1; static int hf_lustre_mds_rec_link_lk_padding_1 = -1; @@ -739,15 +715,12 @@ static int hf_lustre_llog_orphan_rec_lor_hdr = -1; static int hf_lustre_mds_rec_rename_rn_fsuid = -1; static int hf_lustre_cfg_marker_cm_flags = -1; static int hf_lustre_obdo_o_padding_3 = -1; -static int hf_lustre_lov_user_ost_data_join_l_ost_gen = -1; static int hf_lustre_mds_rec_create_cr_fsuid = -1; static int hf_lustre_mds_rec_unlink_ul_fsgid = -1; static int hf_lustre_ldlm_request_lock_desc = -1; -static int hf_lustre_lov_user_md_join_lmm_pattern = -1; static int hf_lustre_mds_rec_unlink_ul_fsuid = -1; static int hf_lustre_mds_rec_link_lk_suppgid2 = -1; static int hf_lustre_llog_orphan_rec_padding = -1; -static int hf_lustre_lov_user_md_join_lmm_tree_gen = -1; static int hf_lustre_obdo_o_flags = -1; static int hf_lustre_mgs_target_info_mti_params = -1; static int hf_lustre_llog_logid_lgl_ogen = -1; @@ -757,7 +730,6 @@ static int hf_lustre_llog_unlink_rec_lur_oid = -1; static int hf_lustre_qunit_data_qd_count = -1; static int hf_lustre_mds_rec_rename_rn_padding_1 = -1; static int hf_lustre_obdo_o_mtime = -1; -static int hf_lustre_lov_mds_md_join_lmmj_md = -1; static int hf_lustre_mds_rec_rename_rn_fsgid = -1; static int hf_lustre_mds_rec_rename_rn_cap = -1; static int hf_lustre_obdo_o_blksize = -1; @@ -767,7 +739,6 @@ static int hf_lustre_mds_rec_link_lk_time = -1; static int hf_lustre_ldlm_reply_lock_handle = -1; static int hf_lustre_mds_rec_unlink_ul_padding_3 = -1; static int hf_lustre_llogd_body_lgd_saved_index = -1; -static int hf_lustre_mds_rec_join_jr_headsize = -1; static int hf_lustre_mds_rec_rename_rn_padding_4 = -1; static int hf_lustre_qunit_data_old_qd_isblk = -1; static int hf_lustre_obdo_o_blocks = -1; @@ -782,10 +753,7 @@ static int hf_lustre_ldlm_lock_desc_l_req_mode = -1; static int hf_lustre_ldlm_extent_end = -1; static int hf_lustre_llog_gen_rec_lgr_hdr = -1; static int hf_lustre_llog_orphan_rec_lor_ogen = -1; -static int hf_lustre_lov_user_md_join_lmm_extent_count = -1; -static int hf_lustre_mds_extent_desc_med_len = -1; static int hf_lustre_llogd_body_lgd_llh_flags = -1; -static int hf_lustre_llog_array_rec_lmr_hdr = -1; static int hf_lustre_llog_log_hdr_llh_cat_idx = -1; static int hf_lustre_llog_log_hdr_llh_bitmap_offset=-1; static int hf_lustre_llog_orphan_rec_lor_oid = -1; @@ -795,11 +763,9 @@ static int hf_lustre_mds_rec_create_cr_padding_4 = -1; static int hf_lustre_llog_logid_rec_padding4 = -1; static int hf_lustre_mds_rec_link_lk_padding_2 = -1; static int hf_lustre_llog_setattr_rec_lsr_gid = -1; -static int hf_lustre_lov_user_md_join_lmm_magic = -1; static int hf_lustre_obd_quotactl_qc_type = -1; static int hf_lustre_cfg_marker_padding = -1; static int hf_lustre_mgs_target_info_mti_nids = -1; -static int hf_lustre_lov_user_ost_data_join_l_extent_end = -1; static int hf_lustre_obdo_o_stripe_idx = -1; static int hf_lustre_llogd_conn_body_lgdc_logid = -1; static int hf_lustre_mds_rec_setattr_sa_fsuid = -1; @@ -811,7 +777,6 @@ static int hf_lustre_qunit_data_old2_qd_count = -1; static int hf_lustre_qunit_data_old2_qd_flags = -1; static int hf_lustre_ldlm_flock_start = -1; static int hf_lustre_quota_adjust_qunit_qaq_bunit_sz = -1; -static int hf_lustre_llog_array_rec_lmr_tail = -1; static int hf_lustre_ldlm_flock_pid = -1; static int hf_lustre_lov_desc_ld_default_stripe_size = -1; static int hf_lustre_mds_rec_setattr_sa_opcode = -1; @@ -856,7 +821,6 @@ static int hf_lustre_llog_cookie_lgc_subsys = -1; static int hf_lustre_llog_log_hdr_llh_hdr = -1; static int hf_lustre_mds_rec_setattr_sa_fsgid = -1; static int hf_lustre_mds_rec_setattr_sa_padding = -1; -static int hf_lustre_lov_mds_md_join_lmmj_extent_count = -1; static int hf_lustre_llog_log_hdr_llh_reserved = -1; /* Header field declarations for field from lustre_user.h*/ @@ -917,7 +881,6 @@ const value_string lustre_ldlm_opcode[] = { const value_string lustre_lov_magic[] = { { LOV_MAGIC_V1, "LOV_MAGIC_V1" }, - { LOV_MAGIC_JOIN, "LOV_MAGIC_JOIN" }, {0, NULL} }; @@ -3328,54 +3291,6 @@ lustre_dissect_struct_mds_rec_create(tvbuff_t *tvb _U_, int offset _U_, packet_i /* TODO : find where this structure appear ! */ -/* IDL: struct mds_rec_join { */ -/* IDL: struct ll_fid { */ -/* IDL: } jr_fid; */ -/* IDL: uint64 jr_headsize; */ -/* IDL: } */ - -static int -lustre_dissect_element_mds_rec_join_jr_fid(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - //offset=lustre_dissect_struct_HASH(0x85b17c0)(tvb,offset,pinfo,tree,hf_lustre_mds_rec_join_jr_fid); - return offset; -} - -static int -lustre_dissect_element_mds_rec_join_jr_headsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mds_rec_join_jr_headsize); - - return offset; -} - -int -lustre_dissect_struct_mds_rec_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_mds_rec_join); - } - - offset=lustre_dissect_element_mds_rec_join_jr_fid(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_mds_rec_join_jr_headsize(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - - /* IDL: struct mds_rec_link { */ /* IDL: uint32 lk_opcode; */ /* IDL: uint32 lk_fsuid; */ @@ -5333,67 +5248,6 @@ lustre_dissect_struct_llog_catid(tvbuff_t *tvb _U_, int offset _U_, packet_info return offset; } - -/* IDL: struct lov_mds_md_join { */ -/* IDL: struct lov_mds_md { */ -/* IDL: } lmmj_md; */ -/* IDL: struct llog_logid { */ -/* IDL: } lmmj_array_id; */ -/* IDL: uint32 lmmj_extent_count; */ -/* IDL: } */ - -static int -lustre_dissect_element_lov_mds_md_join_lmmj_md(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_join_lmmj_md); - return offset; -} - -static int -lustre_dissect_element_lov_mds_md_join_lmmj_array_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_join_lmmj_array_id); - return offset; -} - -static int -lustre_dissect_element_lov_mds_md_join_lmmj_extent_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_mds_md_join_lmmj_extent_count); - - return offset; -} - -int -lustre_dissect_struct_lov_mds_md_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_lov_mds_md_join); - } - - offset=lustre_dissect_element_lov_mds_md_join_lmmj_md(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_mds_md_join_lmmj_array_id(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_mds_md_join_lmmj_extent_count(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - - - /* IDL: struct llog_rec_hdr { */ /* IDL: uint32 lrh_len; */ /* IDL: uint32 lrh_index; */ @@ -5623,132 +5477,6 @@ lustre_dissect_struct_llog_logid_rec(tvbuff_t *tvb _U_, int offset _U_, packet_i return offset; } - - -/* IDL: struct mds_extent_desc { */ -/* IDL: uint64 med_start; */ -/* IDL: uint64 med_len; */ -/* IDL: struct lov_mds_md { */ -/* IDL: } med_lmm; */ -/* IDL: } */ - -static int -lustre_dissect_element_mds_extent_desc_med_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mds_extent_desc_med_start); - - return offset; -} - -static int -lustre_dissect_element_mds_extent_desc_med_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_mds_extent_desc_med_len); - - return offset; -} - -static int -lustre_dissect_element_mds_extent_desc_med_lmm(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - //offset=lustre_dissect_struct_HASH(0x85d3578)(tvb,offset,pinfo,tree,hf_lustre_mds_extent_desc_med_lmm); - /*g_print("bug\n");*/ - return offset; -} - -int -lustre_dissect_struct_mds_extent_desc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_mds_extent_desc); - } - - offset=lustre_dissect_element_mds_extent_desc_med_start(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_mds_extent_desc_med_len(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_mds_extent_desc_med_lmm(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - - -/* IDL: struct llog_array_rec { */ -/* IDL: struct llog_rec_hdr { */ -/* IDL: } lmr_hdr; */ -/* IDL: struct mds_extent_desc { */ -/* IDL: } lmr_med; */ -/* IDL: struct llog_rec_tail { */ -/* IDL: } lmr_tail; */ -/* IDL: } */ - -static int -lustre_dissect_element_llog_array_rec_lmr_hdr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - //offset=lustre_dissect_struct_HASH(0x85d374c)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_hdr); - - return offset; -} - -static int -lustre_dissect_element_llog_array_rec_lmr_med(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - //offset=lustre_dissect_struct_HASH(0x85d4328)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_med); - - return offset; -} - -static int -lustre_dissect_element_llog_array_rec_lmr_tail(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - //offset=lustre_dissect_struct_HASH(0x85d4478)(tvb,offset,pinfo,tree,hf_lustre_llog_array_rec_lmr_tail); - - return offset; -} - -int -lustre_dissect_struct_llog_array_rec(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_llog_array_rec); - } - - offset=lustre_dissect_element_llog_array_rec_lmr_hdr(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_llog_array_rec_lmr_med(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_llog_array_rec_lmr_tail(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - - - - /* IDL: struct llog_create_rec { */ /* IDL: struct llog_rec_hdr { */ /* IDL: } lcr_hdr; */ @@ -6741,259 +6469,6 @@ lustre_dissect_struct_llogd_conn_body(tvbuff_t *tvb _U_, int offset _U_, packet_ return offset; } - - -/* TODO : find when this Structure appear on the wire */ -/* IDL: struct lov_user_ost_data_join { */ -/* IDL: uint64 l_extent_start; */ -/* IDL: uint64 l_extent_end; */ -/* IDL: uint64 l_object_id; */ -/* IDL: uint64 l_object_gr; */ -/* IDL: uint32 l_ost_gen; */ -/* IDL: uint32 l_ost_idx; */ -/* IDL: } */ - -static int -lustre_dissect_element_lov_user_ost_data_join_l_extent_start(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_extent_start); - - return offset; -} - -static int -lustre_dissect_element_lov_user_ost_data_join_l_extent_end(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_extent_end); - - return offset; -} - -static int -lustre_dissect_element_lov_user_ost_data_join_l_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_object_id); - - return offset; -} - -static int -lustre_dissect_element_lov_user_ost_data_join_l_object_gr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_object_gr); - - return offset; -} - -static int -lustre_dissect_element_lov_user_ost_data_join_l_ost_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_ost_gen); - - return offset; -} - -static int -lustre_dissect_element_lov_user_ost_data_join_l_ost_idx(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_ost_data_join_l_ost_idx); - - return offset; -} - -int -lustre_dissect_struct_lov_user_ost_data_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_lov_user_ost_data_join); - } - - offset=lustre_dissect_element_lov_user_ost_data_join_l_extent_start(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_ost_data_join_l_extent_end(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_ost_data_join_l_object_id(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_ost_data_join_l_object_gr(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_ost_data_join_l_ost_gen(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_ost_data_join_l_ost_idx(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - -/* TODO : find when this Structure appear on the wire */ -/* IDL: struct lov_user_md_join { */ -/* IDL: uint32 lmm_magic; */ -/* IDL: uint32 lmm_pattern; */ -/* IDL: uint64 lmm_object_id; */ -/* IDL: uint64 lmm_object_gr; */ -/* IDL: uint32 lmm_stripe_size; */ -/* IDL: uint32 lmm_stripe_count; */ -/* IDL: uint32 lmm_extent_count; */ -/* IDL: uint64 lmm_tree_id; */ -/* IDL: uint64 lmm_tree_gen; */ -/* IDL: struct llog_logid { */ -/* IDL: } lmm_array_id; */ -/* IDL: struct lov_user_ost_data_join { */ -/* IDL: } lmm_objects[0]; */ -/* IDL: } */ - -static int -lustre_dissect_element_lov_user_md_join_lmm_magic(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_magic); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_pattern(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_pattern); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_object_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_object_id); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_object_gr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_object_gr); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_stripe_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_stripe_size); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_stripe_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_stripe_count); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_extent_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint32(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_extent_count); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_tree_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_tree_id); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_tree_gen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_tree_gen); - - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_array_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - offset=lustre_dissect_struct_llog_logid(tvb,offset,pinfo,tree,hf_lustre_lov_user_md_join_lmm_array_id); - return offset; -} - -static int -lustre_dissect_element_lov_user_md_join_lmm_objects(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -{ - - offset=dissect_uint64(tvb, offset, pinfo, tree, hf_lustre_lov_user_md_join_lmm_objects); - //for (i = 0; i < 0; i++) - // offset=lustre_dissect_element_lov_user_md_join_lmm_objects_(tvb, offset, pinfo, tree); - - return offset; -} - -//static int -//lustre_dissect_element_lov_user_md_join_lmm_objects_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) -//{ -// //offset=lustre_dissect_struct_HASH(0x85eb304)(tvb,offset,pinfo,tree,hf_lustre_lov_user_md_join_lmm_objects); -// return offset; -//} - -int -lustre_dissect_struct_lov_user_md_join(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, int hf_index _U_) -{ - proto_item *item = NULL; - proto_tree *tree = NULL; - int old_offset; - - - - old_offset=offset; - - if (parent_tree) { - item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE); - tree = proto_item_add_subtree(item, ett_lustre_lov_user_md_join); - } - - offset=lustre_dissect_element_lov_user_md_join_lmm_magic(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_pattern(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_object_id(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_object_gr(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_stripe_size(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_stripe_count(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_extent_count(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_tree_id(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_tree_gen(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_array_id(tvb, offset, pinfo, tree); - - offset=lustre_dissect_element_lov_user_md_join_lmm_objects(tvb, offset, pinfo, tree); - - - proto_item_set_len(item, offset-old_offset); - - return offset; -} - - /* IDL: struct obdo { */ /* IDL: uint64 o_valid; */ /* IDL: uint64 o_id; */ @@ -8035,10 +7510,6 @@ lustre_ldlm_opcode_process(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo case LOV_MAGIC_V1: offset=lustre_dissect_struct_lov_mds_md_v1(tvb,offset,pinfo,tree,hf_lustre_lov_mds_md_v1); break; - case LOV_MAGIC_JOIN: - offset=lustre_dissect_struct_lov_mds_md_join(tvb, offset, pinfo, tree, - hf_lustre_lov_mds_md_join); - break; default: offset=lustre_dissect_element_data(tvb, offset, pinfo, tree, hf_lustre_extra_padding, LUSTRE_DLM_INTENT_REC_OFF); @@ -9248,8 +8719,6 @@ void proto_register_dcerpc_lustre(void) { &hf_lustre_ldlm_intent, { "ldlm intent", "lustre.ldlm_intent", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}}, - { &hf_lustre_lov_user_md_join, - { "lov user md join", "lustre.lov_user_md_join", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}}, { &hf_lustre_obd_ioobj, { "lustre obd ioobj", "lustre.obd_ioobj", FT_NONE, BASE_NONE, NULL , 0 , "", HFILL}}, { &hf_lustre_niobuf_remote, @@ -9297,8 +8766,6 @@ void proto_register_dcerpc_lustre(void) { "Lgd Len", "lustre.llogd_body.lgd_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_qunit_data_old_qd_id, { "Qd Id", "lustre.qunit_data_old.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_stripe_count, - { "Lmm Stripe Count", "lustre.lov_user_md_join.lmm_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_logid_rec_padding1, { "Padding1", "lustre.llog_logid_rec.padding1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_quota_adjust_qunit_padding1, @@ -9337,8 +8804,6 @@ void proto_register_dcerpc_lustre(void) { "mds reint opcode", "lustre.mds_reint_opcode", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }}, { &hf_lustre_mds_xattr_eadata, { "mds xattr eadata", "lustre.mds_xattr_eadata", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_mds_md_join, - { "lov mds md join", "lustre.lov_mds_md_join", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }}, { &hf_lustre_reint_name, { "mds reint name", "lustre.mds_reint_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }}, { &hf_lustre_reint_old_name, @@ -9406,8 +8871,6 @@ void proto_register_dcerpc_lustre(void) { "Llh Count", "lustre.llog_log_hdr.llh_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_unlink_ul_padding_4, { "Ul Padding 4", "lustre.mds_rec_unlink.ul_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_stripe_size, - { "Lmm Stripe Size", "lustre.lov_user_md_join.lmm_stripe_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_gen_rec_lgr_tail, { "Lgr Tail", "lustre.llog_gen_rec.lgr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_catid_lci_padding3, @@ -9424,8 +8887,6 @@ void proto_register_dcerpc_lustre(void) { "Cr Flags", "lustre.mds_rec_create.cr_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_rename_rn_fid1, { "Rn Fid1", "lustre.mds_rec_rename.rn_fid1", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, - { &hf_lustre_mds_extent_desc_med_start, - { "Med Start", "lustre.mds_extent_desc.med_start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_cookie_lgc_lgl, { "Lgc Lgl", "lustre.llog_cookie.lgc_lgl", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_obd_quotactl_qc_dqinfo, @@ -9450,8 +8911,6 @@ void proto_register_dcerpc_lustre(void) { "Padding5", "lustre.llog_logid_rec.padding5", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_create_cr_fsgid, { "Cr Fsgid", "lustre.mds_rec_create.cr_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_mds_rec_join_jr_fid, - { "Jr Fid", "lustre.mds_rec_join.jr_fid", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, /*-------------------------------------------------------------------------------------------------------------*/ /*all this flags are uint64, but I don't find the way to use something like TFS() with a Uint64*/ { &hf_lustre_ldlm_intent_opc_open, @@ -9511,10 +8970,6 @@ void proto_register_dcerpc_lustre(void) { "Lsc Hdr", "lustre.llog_size_change_rec.lsc_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_unlink_ul_time, { "Ul Time", "lustre.mds_rec_unlink.ul_time",FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_extent_start, - { "L Extent Start", "lustre.lov_user_ost_data_join.l_extent_start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_tree_id, - { "Lmm Tree Id", "lustre.lov_user_md_join.lmm_tree_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_create_rec_lcr_tail, { "Lcr Tail", "lustre.llog_create_rec.lcr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_setattr_sa_mode, @@ -9539,8 +8994,6 @@ void proto_register_dcerpc_lustre(void) { "Qd Id", "lustre.qunit_data.qd_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mgs_target_info_mti_fsname, { "Mti Fsname", "lustre.mgs_target_info.mti_fsname", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_object_gr, - { "Lmm Object Gr", "lustre.lov_user_md_join.lmm_object_gr", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_ldlm_request_lock_flags, { "Lock Flags", "lustre.ldlm_request.lock_flags", FT_UINT32, BASE_HEX, NULL, 0 , "", HFILL }}, { &hf_lustre_obdo_o_mode, @@ -9571,18 +9024,12 @@ void proto_register_dcerpc_lustre(void) { "Lk Suppgid1", "lustre.mds_rec_link.lk_suppgid1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obd_quotactl_qc_cmd, { "Qc Cmd", "lustre.obd_quotactl.qc_cmd", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_object_id, - { "Lmm Object Id", "lustre.lov_user_md_join.lmm_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_rename_rn_padding_3, { "Rn Padding 3", "lustre.mds_rec_rename.rn_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_qunit_data_padding, { "Padding", "lustre.qunit_data.padding", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_objects, - { "Lmm Objects", "lustre.lov_user_md_join.lmm_objects", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_quota_adjust_qunit_qaq_flags, { "Qaq Flags", "lustre.quota_adjust_qunit.qaq_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_object_gr, - { "L Object Gr", "lustre.lov_user_ost_data_join.l_object_gr", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_ldlm_lock_desc_l_granted_mode, { "L Granted Mode", "lustre.ldlm_lock_desc.l_granted_mode", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_mode_t_vals), 0, "", HFILL }}, { &hf_lustre_obdo_o_gr, @@ -9597,8 +9044,6 @@ void proto_register_dcerpc_lustre(void) { "Lrt Index", "lustre.llog_rec_tail.lrt_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_mds, { "O Mds", "lustre.obdo.o_mds", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_mds_extent_desc_med_lmm, - { "Med Lmm", "lustre.mds_extent_desc.med_lmm", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_lov_desc_ld_default_stripe_count, { "Ld Default Stripe Count", "lustre.lov_desc.ld_default_stripe_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_ldlm_resource_desc_lr_padding, @@ -9617,20 +9062,14 @@ void proto_register_dcerpc_lustre(void) { "Ul Padding 1", "lustre.mds_rec_unlink.ul_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_unlink_ul_cap, { "Ul Cap", "lustre.mds_rec_unlink.ul_cap", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_llog_array_rec_lmr_med, - { "Lmr Med", "lustre.llog_array_rec.lmr_med", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_setattr_rec_lsr_ogen, { "Lsr Ogen", "lustre.llog_setattr_rec.lsr_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_create_cr_padding_3, { "Cr Padding 3", "lustre.mds_rec_create.cr_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_logid_rec_lid_hdr, { "Lid Hdr", "lustre.llog_logid_rec.lid_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_ost_idx, - { "L Ost Idx", "lustre.lov_user_ost_data_join.l_ost_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_easize, { "O Easize", "lustre.obdo.o_easize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_array_id, - { "Lmm Array Id", "lustre.lov_user_md_join.lmm_array_id", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_ost_body_oa, { "Oa", "lustre.ost_body.oa", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_logid_rec_padding3, @@ -9656,8 +9095,6 @@ void proto_register_dcerpc_lustre(void) { "Cm Createtime", "lustre.cfg_marker.cm_createtime",FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_qunit_data_old_qd_count, { "Qd Count", "lustre.qunit_data_old.qd_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_mds_md_join_lmmj_array_id, - { "Lmmj Array Id", "lustre.lov_mds_md_join.lmmj_array_id", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_setattr_sa_uid, { "Sa Uid", "lustre.mds_rec_setattr.sa_uid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_catid_lci_padding1, @@ -9670,8 +9107,6 @@ void proto_register_dcerpc_lustre(void) { "O Lcookie", "lustre.obdo.o_lcookie", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_gen_rec_lgr_gen, { "Lgr Gen", "lustre.llog_gen_rec.lgr_gen", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_object_id, - { "L Object Id", "lustre.lov_user_ost_data_join.l_object_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_id, { "O Id", "lustre.obdo.o_id", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mgs_target_info_mti_uuid, @@ -9710,24 +9145,18 @@ void proto_register_dcerpc_lustre(void) { "Cm Flags", "lustre.cfg_marker.cm_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_padding_3, { "O Padding 3", "lustre.obdo.o_padding_3", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_ost_gen, - { "L Ost Gen", "lustre.lov_user_ost_data_join.l_ost_gen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_create_cr_fsuid, { "Cr Fsuid", "lustre.mds_rec_create.cr_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_unlink_ul_fsgid, { "Ul Fsgid", "lustre.mds_rec_unlink.ul_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_ldlm_request_lock_desc, { "Lock Desc", "lustre.ldlm_request.lock_desc", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_pattern, - { "Lmm Pattern", "lustre.lov_user_md_join.lmm_pattern", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_unlink_ul_fsuid, { "Ul Fsuid", "lustre.mds_rec_unlink.ul_fsuid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_link_lk_suppgid2, { "Lk Suppgid2", "lustre.mds_rec_link.lk_suppgid2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_orphan_rec_padding, { "Padding", "lustre.llog_orphan_rec.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_tree_gen, - { "Lmm Tree Gen", "lustre.lov_user_md_join.lmm_tree_gen", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_flags, { "O Flags", "lustre.obdo.o_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mgs_target_info_mti_params, @@ -9746,8 +9175,6 @@ void proto_register_dcerpc_lustre(void) { "Rn Padding 1", "lustre.mds_rec_rename.rn_padding_1", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_mtime, { "O Mtime", "lustre.obdo.o_mtime",FT_ABSOLUTE_TIME, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_mds_md_join_lmmj_md, - { "Lmmj Md", "lustre.lov_mds_md_join.lmmj_md", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_rename_rn_fsgid, { "Rn Fsgid", "lustre.mds_rec_rename.rn_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_rename_rn_cap, @@ -9766,8 +9193,6 @@ void proto_register_dcerpc_lustre(void) { "Ul Padding 3", "lustre.mds_rec_unlink.ul_padding_3", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llogd_body_lgd_saved_index, { "Lgd Saved Index", "lustre.llogd_body.lgd_saved_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_mds_rec_join_jr_headsize, - { "Jr Headsize", "lustre.mds_rec_join.jr_headsize", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_rename_rn_padding_4, { "Rn Padding 4", "lustre.mds_rec_rename.rn_padding_4", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_qunit_data_old_qd_isblk, @@ -9796,14 +9221,8 @@ void proto_register_dcerpc_lustre(void) { "Lgr Hdr", "lustre.llog_gen_rec.lgr_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_orphan_rec_lor_ogen, { "Lor Ogen", "lustre.llog_orphan_rec.lor_ogen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_extent_count, - { "Lmm Extent Count", "lustre.lov_user_md_join.lmm_extent_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_mds_extent_desc_med_len, - { "Med Len", "lustre.mds_extent_desc.med_len", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llogd_body_lgd_llh_flags, { "Lgd Llh Flags", "lustre.llogd_body.lgd_llh_flags", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_llog_array_rec_lmr_hdr, - { "Lmr Hdr", "lustre.llog_array_rec.lmr_hdr", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_llog_log_hdr_llh_cat_idx, { "Llh Cat Idx", "lustre.llog_log_hdr.llh_cat_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_log_hdr_llh_bitmap_offset, @@ -9822,16 +9241,12 @@ void proto_register_dcerpc_lustre(void) { "Lk Padding 2", "lustre.mds_rec_link.lk_padding_2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_setattr_rec_lsr_gid, { "Lsr Gid", "lustre.llog_setattr_rec.lsr_gid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_md_join_lmm_magic, - { "Lmm Magic", "lustre.lov_user_md_join.lmm_magic", FT_UINT32, BASE_HEX, VALS(lustre_lov_magic), 0, "", HFILL }}, { &hf_lustre_obd_quotactl_qc_type, { "Qc Type", "lustre.obd_quotactl.qc_type", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_cfg_marker_padding, { "Padding", "lustre.cfg_marker.padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mgs_target_info_mti_nids, { "Mti Nids", "lustre.mgs_target_info.mti_nids", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_user_ost_data_join_l_extent_end, - { "L Extent End", "lustre.lov_user_ost_data_join.l_extent_end", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_obdo_o_stripe_idx, { "O Stripe Idx", "lustre.obdo.o_stripe_idx", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llogd_conn_body_lgdc_logid, @@ -9856,8 +9271,6 @@ void proto_register_dcerpc_lustre(void) { "Start", "lustre.ldlm_flock.start", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_quota_adjust_qunit_qaq_bunit_sz, { "Qaq Bunit Sz", "lustre.quota_adjust_qunit.qaq_bunit_sz", FT_UINT64, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_llog_array_rec_lmr_tail, - { "Lmr Tail", "lustre.llog_array_rec.lmr_tail", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }}, { &hf_lustre_ldlm_flock_pid, { "Pid", "lustre.ldlm_flock.pid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_lov_desc_ld_default_stripe_size, @@ -9955,8 +9368,6 @@ void proto_register_dcerpc_lustre(void) { "Sa Fsgid", "lustre.mds_rec_setattr.sa_fsgid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_mds_rec_setattr_sa_padding, { "Sa Padding", "lustre.mds_rec_setattr.sa_padding", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, - { &hf_lustre_lov_mds_md_join_lmmj_extent_count, - { "Lmmj Extent Count", "lustre.lov_mds_md_join.lmmj_extent_count", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_lustre_llog_log_hdr_llh_reserved, { "Llh Reserved", "lustre.llog_log_hdr.llh_reserved", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, @@ -10024,7 +9435,6 @@ void proto_register_dcerpc_lustre(void) &ett_lustre_quota_adjust_qunit, &ett_lustre_mds_rec_setattr, &ett_lustre_mds_rec_create, - &ett_lustre_mds_rec_join, &ett_lustre_mds_rec_link, &ett_lustre_mds_rec_unlink, &ett_lustre_mds_rec_rename, @@ -10051,7 +9461,6 @@ void proto_register_dcerpc_lustre(void) &ett_lustre_llog_logid, &ett_lustre_llog_catid, &ett_lustre_llog_logid, - &ett_lustre_lov_mds_md_join, &ett_lustre_lov_mds_md, &ett_lustre_llog_logid, &ett_lustre_llog_rec_hdr, @@ -10060,11 +9469,8 @@ void proto_register_dcerpc_lustre(void) &ett_lustre_llog_rec_hdr, &ett_lustre_llog_logid, &ett_lustre_llog_rec_tail, - &ett_lustre_mds_extent_desc, &ett_lustre_lov_mds_md, - &ett_lustre_llog_array_rec, &ett_lustre_llog_rec_hdr, - &ett_lustre_mds_extent_desc, &ett_lustre_llog_rec_tail, &ett_lustre_llog_create_rec, &ett_lustre_llog_rec_hdr, @@ -10099,10 +9505,7 @@ void proto_register_dcerpc_lustre(void) &ett_lustre_llogd_conn_body, &ett_lustre_llog_gen, &ett_lustre_llog_logid, - &ett_lustre_lov_user_ost_data_join, - &ett_lustre_lov_user_md_join, &ett_lustre_llog_logid, - &ett_lustre_lov_user_ost_data_join, &ett_lustre_obdo, &ett_lustre_lustre_handle, &ett_lustre_llog_cookie, diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h index ececca3..f7ef0ca 100644 --- a/lustre/include/linux/lustre_fsfilt.h +++ b/lustre/include/linux/lustre_fsfilt.h @@ -177,7 +177,6 @@ static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd, #define FSFILT_OP_SETATTR 8 #define FSFILT_OP_LINK 9 #define FSFILT_OP_CANCEL_UNLINK 10 -#define FSFILT_OP_JOIN 11 #define FSFILT_OP_NOOP 15 #define FSFILT_OP_UNLINK_PARTIAL_CHILD 21 #define FSFILT_OP_UNLINK_PARTIAL_PARENT 22 diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 076217f..5e205b8 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -729,7 +729,11 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); #define OBD_CONNECT_TRUNCLOCK 0x400ULL /*locks on server for punch */ #define OBD_CONNECT_TRANSNO 0x800ULL /*replay sends init transno */ #define OBD_CONNECT_IBITS 0x1000ULL /*support for inodebits locks*/ -#define OBD_CONNECT_JOIN 0x2000ULL /*files can be concatenated */ +#define OBD_CONNECT_JOIN 0x2000ULL /*files can be concatenated. + *We do not support JOIN FILE + *anymore, reserve this flags + *just for preventing such bit + *to be reused.*/ #define OBD_CONNECT_ATTRFID 0x4000ULL /*Server can GetAttr By Fid*/ #define OBD_CONNECT_NODEVOH 0x8000ULL /*No open hndl on specl nodes*/ #define OBD_CONNECT_RMT_CLIENT 0x10000ULL /*Remote client */ @@ -897,7 +901,7 @@ enum obdo_flags { #define LOV_MAGIC_V1 0x0BD10BD0 #define LOV_MAGIC LOV_MAGIC_V1 -#define LOV_MAGIC_JOIN 0x0BD20BD0 +#define LOV_MAGIC_JOIN_V1 0x0BD20BD0 #define LOV_MAGIC_V3 0x0BD30BD0 #define LOV_PATTERN_RAID0 0x001 /* stripes are used round-robin */ @@ -1524,7 +1528,11 @@ extern void lustre_swab_mdt_rec_setattr (struct mdt_rec_setattr *sa); #define MDS_OPEN_DELAY_CREATE 0100000000 /* delay initial object create */ #define MDS_OPEN_OWNEROVERRIDE 0200000000 /* NFSD rw-reopen ro file for owner */ -#define MDS_OPEN_JOIN_FILE 0400000000 /* open for join file*/ +#define MDS_OPEN_JOIN_FILE 0400000000 /* open for join file. + * We do not support JOIN FILE + * anymore, reserve this flags + * just for preventing such bit + * to be reused. */ #define MDS_CREATE_RMT_ACL 01000000000 /* indicate create on remote server * with default ACL */ #define MDS_CREATE_SLAVE_OBJ 02000000000 /* indicate create slave object @@ -1610,20 +1618,6 @@ struct mdt_rec_create { 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; @@ -2145,14 +2139,6 @@ struct llog_catid { __u32 lci_padding3; } __attribute__((packed)); -/** join file lov mds md*/ -struct lov_mds_md_join { - struct lov_mds_md lmmj_md; - /*join private info*/ - struct llog_logid lmmj_array_id; /*array object id*/ - __u32 lmmj_extent_count; /*array extent count*/ -}; - /* Log data record types - there is no specific reason that these need to * be related to the RPC opcodes, but no reason not to (may be handy later?) */ @@ -2169,7 +2155,7 @@ typedef enum { OBD_CFG_REC = LLOG_OP_MAGIC | 0x20000, PTL_CFG_REC = LLOG_OP_MAGIC | 0x30000, /* obsolete */ LLOG_GEN_REC = LLOG_OP_MAGIC | 0x40000, - LLOG_JOIN_REC = LLOG_OP_MAGIC | 0x50000, + LLOG_JOIN_REC = LLOG_OP_MAGIC | 0x50000, /* obsolete */ CHANGELOG_REC = LLOG_OP_MAGIC | 0x60000, CHANGELOG_USER_REC = LLOG_OP_MAGIC | 0x70000, LLOG_HDR_MAGIC = LLOG_OP_MAGIC | 0x45539, @@ -2212,23 +2198,6 @@ struct llog_logid_rec { struct llog_rec_tail lid_tail; } __attribute__((packed)); -/** MDS extent description - * It is for joined file extent info, each extent info for joined file - * just like (start, end, lmm). - */ -struct mds_extent_desc { - __u64 med_start; /* extent start */ - __u64 med_len; /* extent length */ - struct lov_mds_md med_lmm; /* extent's lmm */ -}; - -/** Joined file array extent log record*/ -struct llog_array_rec { - struct llog_rec_hdr lmr_hdr; - struct mds_extent_desc lmr_med; - struct llog_rec_tail lmr_tail; -}; - struct llog_create_rec { struct llog_rec_hdr lcr_hdr; struct ll_fid lcr_fid; @@ -2404,29 +2373,6 @@ struct llogd_conn_body { __u32 lgdc_ctxt_idx; } __attribute__((packed)); -struct lov_user_ost_data_join { /* per-stripe data structure */ - __u64 l_extent_start; /* extent start*/ - __u64 l_extent_end; /* extent end*/ - __u64 l_object_id; /* OST object ID */ - __u64 l_object_gr; /* OST object group (creating MDS number) */ - __u32 l_ost_gen; /* generation of this OST index */ - __u32 l_ost_idx; /* OST index in LOV */ -} __attribute__((packed)); - -struct lov_user_md_join { /* LOV EA user data (host-endian) */ - __u32 lmm_magic; /* magic number = LOV_MAGIC_JOIN */ - __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */ - __u64 lmm_object_id; /* LOV object ID */ - __u64 lmm_object_gr; /* LOV object group */ - __u32 lmm_stripe_size; /* size of stripe in bytes */ - __u32 lmm_stripe_count; /* num stripes in use for this object */ - __u32 lmm_extent_count; /* extent count of lmm*/ - __u64 lmm_tree_id; /* mds tree object id */ - __u64 lmm_tree_gen; /* mds tree object gen */ - struct llog_logid lmm_array_id; /* mds extent desc llog object id */ - struct lov_user_ost_data_join lmm_objects[0]; /* per-stripe data */ -} __attribute__((packed)); - /* Note: 64-bit types are 64-bit aligned in structure */ struct obdo { obd_valid o_valid; /* hot fields in this obdo */ @@ -2507,7 +2453,6 @@ extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum); extern void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum); extern void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod, int stripe_count); -extern void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj); extern void lustre_swab_lov_mds_md(struct lov_mds_md *lmm); /* llog_swab.c */ @@ -2569,8 +2514,6 @@ typedef enum { } quota_cmd_t; #define QUOTA_FIRST_OPC QUOTA_DQACQ -#define JOIN_FILE_ALIGN 4096 - #define QUOTA_REQUEST 1 #define QUOTA_REPLY 0 #define QUOTA_EXPORT 1 diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index 04c321a..0777e2a 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -122,7 +122,6 @@ struct obd_statfs { #define LL_IOC_QUOTACHECK _IOW ('f', 160, int) #define LL_IOC_POLL_QUOTACHECK _IOR ('f', 161, struct if_quotacheck *) #define LL_IOC_QUOTACTL _IOWR('f', 162, struct if_quotactl *) -#define LL_IOC_JOIN _IOW ('f', 163, long) #define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *) #define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *) #define LL_IOC_FLUSHCTX _IOW ('f', 166, long) @@ -158,7 +157,7 @@ struct obd_statfs { #define LOV_USER_MAGIC_V1 0x0BD10BD0 #define LOV_USER_MAGIC LOV_USER_MAGIC_V1 -#define LOV_USER_MAGIC_JOIN 0x0BD20BD0 +#define LOV_USER_MAGIC_JOIN_V1 0x0BD20BD0 #define LOV_USER_MAGIC_V3 0x0BD30BD0 #define LOV_PATTERN_RAID0 0x001 diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h index b0b9a6a..56a5cf0 100644 --- a/lustre/include/lustre_mds.h +++ b/lustre/include/lustre_mds.h @@ -90,7 +90,5 @@ static inline int md_should_create(__u32 flags) /* these are local flags, used only on the client, private */ #define M_CHECK_STALE 0200000000 -#define M_JOIN_FILE 0400000000 /* its counterpart is - * MDS_OPEN_JOIN_FILE */ #endif diff --git a/lustre/include/lustre_req_layout.h b/lustre/include/lustre_req_layout.h index e90f554..8c650e7 100644 --- a/lustre/include/lustre_req_layout.h +++ b/lustre/include/lustre_req_layout.h @@ -241,7 +241,6 @@ extern const struct req_msg_field RMF_DLM_LVB; extern const struct req_msg_field RMF_LDLM_INTENT; extern const struct req_msg_field RMF_MDT_MD; extern const struct req_msg_field RMF_REC_REINT; -extern const struct req_msg_field RMF_REC_JOINFILE; extern const struct req_msg_field RMF_EADATA; extern const struct req_msg_field RMF_ACL; extern const struct req_msg_field RMF_LOGCOOKIES; diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 2f7e2bf..03ef1b3 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -128,21 +128,6 @@ static inline void loi_init(struct lov_oinfo *loi) CFS_INIT_LIST_HEAD(&loi->loi_read_item); } -/*extent array item for describing the joined file extent info*/ -struct lov_extent { - __u64 le_start; /* extent start */ - __u64 le_len; /* extent length */ - int le_loi_idx; /* extent #1 loi's index in lsm loi array */ - int le_stripe_count; /* extent stripe count*/ -}; - -/*Lov array info for describing joined file array EA info*/ -struct lov_array_info { - struct llog_logid lai_array_id; /* MDS med llog object id */ - unsigned lai_ext_count; /* number of extent count */ - struct lov_extent *lai_ext_array; /* extent desc array */ -}; - struct lov_stripe_md { spinlock_t lsm_lock; pid_t lsm_lock_owner; /* debugging */ @@ -161,7 +146,6 @@ struct lov_stripe_md { char lw_pool_name[LOV_MAXPOOLNAME]; /* pool name */ } lsm_wire; - struct lov_array_info *lsm_array; /*Only for joined file array info*/ struct lov_oinfo *lsm_oinfo[0]; }; @@ -1335,8 +1319,6 @@ struct obd_ops { struct lov_stripe_md *mem_src); int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt, struct lov_mds_md *disk_src, int disk_len); - int (*o_checkmd)(struct obd_export *exp, struct obd_export *md_exp, - struct lov_stripe_md *mem_tgt); int (*o_preallocate)(struct lustre_handle *, obd_count *req, obd_id *ids); /* FIXME: add fid capability support for create & destroy! */ @@ -1599,10 +1581,6 @@ struct lsm_operations { obd_off *); void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *, obd_off *); - obd_off (*lsm_stripe_offset_by_index)(struct lov_stripe_md *, int); - obd_off (*lsm_stripe_offset_by_offset)(struct lov_stripe_md *, obd_off); - int (*lsm_stripe_index_by_offset)(struct lov_stripe_md *, obd_off); - int (*lsm_revalidate) (struct lov_stripe_md *, struct obd_device *obd); int (*lsm_lmm_verify) (struct lov_mds_md *lmm, int lmm_bytes, int *stripe_count); int (*lsm_unpackmd) (struct lov_obd *lov, struct lov_stripe_md *lsm, @@ -1610,15 +1588,12 @@ struct lsm_operations { }; extern const struct lsm_operations lsm_v1_ops; -extern const struct lsm_operations lsm_join_ops; extern const struct lsm_operations lsm_v3_ops; static inline const struct lsm_operations *lsm_op_find(int magic) { switch(magic) { case LOV_MAGIC_V1: return &lsm_v1_ops; - case LOV_MAGIC_JOIN: - return &lsm_join_ops; case LOV_MAGIC_V3: return &lsm_v3_ops; default: diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index a62ed99..0d00d44 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -683,20 +683,6 @@ static inline int obd_free_memmd(struct obd_export *exp, return rc; } -static inline int obd_checkmd(struct obd_export *exp, - struct obd_export *md_exp, - struct lov_stripe_md *mem_tgt) -{ - int rc; - ENTRY; - - EXP_CHECK_DT_OP(exp, checkmd); - EXP_COUNTER_INCREMENT(exp, checkmd); - - rc = OBP(exp->exp_obd, checkmd)(exp, md_exp, mem_tgt); - RETURN(rc); -} - static inline int obd_precreate(struct obd_export *exp) { int rc; diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 30e0134..fbee57a 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -838,7 +838,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, lump = &lmdp->lmd_lmm; } if (copy_to_user(lump, lmm, lmmsize)) - GOTO(out_lmm, rc = -EFAULT); + GOTO(out_req, rc = -EFAULT); skip_lmm: if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) { struct lov_user_mds_data *lmdp; @@ -860,13 +860,10 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, lmdp = (struct lov_user_mds_data *)arg; if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st))) - GOTO(out_lmm, rc = -EFAULT); + GOTO(out_req, rc = -EFAULT); } EXIT; - out_lmm: - if (lmm && lmm->lmm_magic == LOV_MAGIC_JOIN) - OBD_FREE(lmm, lmmsize); out_req: ptlrpc_req_finished(request); if (filename) @@ -920,10 +917,6 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, if (rc < 0) GOTO(free_lmm, rc = -ENOMEM); - rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp, lsm); - if (rc) - GOTO(free_lsm, rc); - /* Perform glimpse_size operation. */ memset(&st, 0, sizeof(st)); diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 5fa062d..3570e55 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -1291,8 +1291,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, LASSERT(lmm != NULL); if ((lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V1)) && - (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V3)) && - (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_JOIN))) { + (lmm->lmm_magic != cpu_to_le32(LOV_MAGIC_V3))) { GOTO(out, rc = -EPROTO); } @@ -1316,62 +1315,9 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, lustre_swab_lov_user_md_objects( ((struct lov_user_md_v3 *)lmm)->lmm_objects, ((struct lov_user_md_v3 *)lmm)->lmm_stripe_count); - } else if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_JOIN)) { - lustre_swab_lov_user_md_join((struct lov_user_md_join *)lmm); } } - if (lmm->lmm_magic == LOV_MAGIC_JOIN) { - struct lov_stripe_md *lsm; - struct lov_user_md_join *lmj; - int lmj_size, i, aindex = 0; - - rc = obd_unpackmd(sbi->ll_dt_exp, &lsm, lmm, lmmsize); - if (rc < 0) - GOTO(out, rc = -ENOMEM); - rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp, lsm); - if (rc) - GOTO(out_free_memmd, rc); - - lmj_size = sizeof(struct lov_user_md_join) + - lsm->lsm_stripe_count * - sizeof(struct lov_user_ost_data_join); - OBD_ALLOC(lmj, lmj_size); - if (!lmj) - GOTO(out_free_memmd, rc = -ENOMEM); - - memcpy(lmj, lmm, sizeof(struct lov_user_md_join)); - for (i = 0; i < lsm->lsm_stripe_count; i++) { - struct lov_extent *lex = - &lsm->lsm_array->lai_ext_array[aindex]; - - if (lex->le_loi_idx + lex->le_stripe_count <= i) - aindex ++; - CDEBUG(D_INFO, "aindex %d i %d l_extent_start " - LPU64" len %d\n", aindex, i, - lex->le_start, (int)lex->le_len); - lmj->lmm_objects[i].l_extent_start = - lex->le_start; - - if ((int)lex->le_len == -1) - lmj->lmm_objects[i].l_extent_end = -1; - else - lmj->lmm_objects[i].l_extent_end = - lex->le_start + lex->le_len; - lmj->lmm_objects[i].l_object_id = - lsm->lsm_oinfo[i]->loi_id; - lmj->lmm_objects[i].l_object_gr = - lsm->lsm_oinfo[i]->loi_gr; - lmj->lmm_objects[i].l_ost_gen = - lsm->lsm_oinfo[i]->loi_ost_gen; - lmj->lmm_objects[i].l_ost_idx = - lsm->lsm_oinfo[i]->loi_ost_idx; - } - lmm = (struct lov_mds_md *)lmj; - lmmsize = lmj_size; -out_free_memmd: - obd_free_memmd(sbi->ll_dt_exp, &lsm); - } out: *lmmp = lmm; *lmm_size = lmmsize; @@ -1527,179 +1473,6 @@ int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg) RETURN(0); } -#if LUSTRE_FIX >= 50 -static int join_sanity_check(struct inode *head, struct inode *tail) -{ - ENTRY; - if ((ll_i2sbi(head)->ll_flags & LL_SBI_JOIN) == 0) { - CERROR("server do not support join \n"); - RETURN(-EINVAL); - } - if (!S_ISREG(tail->i_mode) || !S_ISREG(head->i_mode)) { - CERROR("tail ino %lu and ino head %lu must be regular\n", - head->i_ino, tail->i_ino); - RETURN(-EINVAL); - } - if (head->i_ino == tail->i_ino) { - CERROR("file %lu can not be joined to itself \n", head->i_ino); - RETURN(-EINVAL); - } - if (i_size_read(head) % JOIN_FILE_ALIGN) { - CERROR("hsize %llu must be times of 64K\n", i_size_read(head)); - RETURN(-EINVAL); - } - RETURN(0); -} - -static int join_file(struct inode *head_inode, struct file *head_filp, - struct file *tail_filp) -{ - struct dentry *tail_dentry = tail_filp->f_dentry; - struct lookup_intent oit = {.it_op = IT_OPEN, - .it_flags = head_filp->f_flags, - .it_create_mode = M_JOIN_FILE}; - struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CW, - ll_md_blocking_ast, ldlm_completion_ast, NULL, NULL, NULL }; - - struct lustre_handle lockh; - struct md_op_data *op_data; - int rc; - loff_t data; - ENTRY; - - tail_dentry = tail_filp->f_dentry; - - data = i_size_read(head_inode); - op_data = ll_prep_md_op_data(NULL, head_inode, - tail_dentry->d_parent->d_inode, - tail_dentry->d_name.name, - tail_dentry->d_name.len, 0, - LUSTRE_OPC_ANY, &data); - if (IS_ERR(op_data)) - RETURN(PTR_ERR(op_data)); - - rc = md_enqueue(ll_i2mdexp(head_inode), &einfo, &oit, - op_data, &lockh, NULL, 0, NULL, 0); - - ll_finish_md_op_data(op_data); - if (rc < 0) - GOTO(out, rc); - - rc = oit.d.lustre.it_status; - - if (rc < 0 || it_open_error(DISP_OPEN_OPEN, &oit)) { - rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, &oit); - ptlrpc_req_finished((struct ptlrpc_request *) - oit.d.lustre.it_data); - GOTO(out, rc); - } - - if (oit.d.lustre.it_lock_mode) { /* If we got lock - release it right - * away */ - ldlm_lock_decref(&lockh, oit.d.lustre.it_lock_mode); - oit.d.lustre.it_lock_mode = 0; - } - ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data); - it_clear_disposition(&oit, DISP_ENQ_COMPLETE); - ll_release_openhandle(head_filp->f_dentry, &oit); -out: - ll_intent_release(&oit); - RETURN(rc); -} - -static int ll_file_join(struct inode *head, struct file *filp, - char *filename_tail) -{ - struct inode *tail = NULL, *first = NULL, *second = NULL; - struct dentry *tail_dentry; - struct file *tail_filp, *first_filp, *second_filp; - struct ll_lock_tree first_tree, second_tree; - struct ll_lock_tree_node *first_node, *second_node; - struct ll_inode_info *hlli = ll_i2info(head); - int rc = 0, cleanup_phase = 0; - ENTRY; - - CDEBUG(D_VFSTRACE, "VFS Op:head=%lu/%u(%p) tail %s\n", - head->i_ino, head->i_generation, head, filename_tail); - - tail_filp = filp_open(filename_tail, O_WRONLY, 0644); - if (IS_ERR(tail_filp)) { - CERROR("Can not open tail file %s", filename_tail); - rc = PTR_ERR(tail_filp); - GOTO(cleanup, rc); - } - tail = igrab(tail_filp->f_dentry->d_inode); - - tail_dentry = tail_filp->f_dentry; - LASSERT(tail_dentry); - cleanup_phase = 1; - - /*reorder the inode for lock sequence*/ - first = head->i_ino > tail->i_ino ? head : tail; - second = head->i_ino > tail->i_ino ? tail : head; - first_filp = head->i_ino > tail->i_ino ? filp : tail_filp; - second_filp = head->i_ino > tail->i_ino ? tail_filp : filp; - - CDEBUG(D_INFO, "reorder object from %lu:%lu to %lu:%lu \n", - head->i_ino, tail->i_ino, first->i_ino, second->i_ino); - first_node = ll_node_from_inode(first, 0, OBD_OBJECT_EOF, LCK_EX); - if (IS_ERR(first_node)){ - rc = PTR_ERR(first_node); - GOTO(cleanup, rc); - } - first_tree.lt_fd = first_filp->private_data; - rc = ll_tree_lock(&first_tree, first_node, NULL, 0, 0); - if (rc != 0) - GOTO(cleanup, rc); - cleanup_phase = 2; - - second_node = ll_node_from_inode(second, 0, OBD_OBJECT_EOF, LCK_EX); - if (IS_ERR(second_node)){ - rc = PTR_ERR(second_node); - GOTO(cleanup, rc); - } - second_tree.lt_fd = second_filp->private_data; - rc = ll_tree_lock(&second_tree, second_node, NULL, 0, 0); - if (rc != 0) - GOTO(cleanup, rc); - cleanup_phase = 3; - - rc = join_sanity_check(head, tail); - if (rc) - GOTO(cleanup, rc); - - rc = join_file(head, filp, tail_filp); - if (rc) - GOTO(cleanup, rc); -cleanup: - switch (cleanup_phase) { - case 3: - ll_tree_unlock(&second_tree); - obd_cancel_unused(ll_i2dtexp(second), - ll_i2info(second)->lli_smd, 0, NULL); - case 2: - ll_tree_unlock(&first_tree); - obd_cancel_unused(ll_i2dtexp(first), - ll_i2info(first)->lli_smd, 0, NULL); - case 1: - filp_close(tail_filp, 0); - if (tail) - iput(tail); - if (head && rc == 0) { - obd_free_memmd(ll_i2sbi(head)->ll_dt_exp, - &hlli->lli_smd); - hlli->lli_smd = NULL; - } - case 0: - break; - default: - CERROR("invalid cleanup_phase %d\n", cleanup_phase); - LBUG(); - } - RETURN(rc); -} -#endif /* LUSTRE_FIX >= 50 */ - /** * Close inode open handle * @@ -1945,23 +1718,6 @@ error: case FSFILT_IOC_GETVERSION_OLD: case FSFILT_IOC_GETVERSION: RETURN(put_user(inode->i_generation, (int *)arg)); - case LL_IOC_JOIN: { -#if LUSTRE_FIX >= 50 - /* Allow file join in beta builds to allow debuggging */ - char *ftail; - int rc; - - ftail = getname((const char *)arg); - if (IS_ERR(ftail)) - RETURN(PTR_ERR(ftail)); - rc = ll_file_join(inode, file, ftail); - putname(ftail); - RETURN(rc); -#else - CWARN("file join is not supported in this version of Lustre\n"); - RETURN(-ENOTTY); -#endif - } case LL_IOC_GROUP_LOCK: RETURN(ll_get_grouplock(inode, file, arg)); case LL_IOC_GROUP_UNLOCK: diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 62870d2..0679056 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -295,7 +295,6 @@ enum stats_track_type { #define LL_SBI_FLOCK 0x04 #define LL_SBI_USER_XATTR 0x08 /* support user xattr */ #define LL_SBI_ACL 0x10 /* support ACL */ -#define LL_SBI_JOIN 0x20 /* support JOIN */ #define LL_SBI_RMT_CLIENT 0x40 /* remote client */ #define LL_SBI_MDS_CAPA 0x80 /* support mds capa */ #define LL_SBI_OSS_CAPA 0x100 /* support oss capa */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 11c65e1..2ea9d2e 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -303,9 +303,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt) sbi->ll_flags &= ~LL_SBI_ACL; } - if (data->ocd_connect_flags & OBD_CONNECT_JOIN) - sbi->ll_flags |= LL_SBI_JOIN; - if (data->ocd_connect_flags & OBD_CONNECT_RMT_CLIENT) { if (!(sbi->ll_flags & LL_SBI_RMT_CLIENT)) { sbi->ll_flags |= LL_SBI_RMT_CLIENT; @@ -1507,23 +1504,6 @@ void ll_inode_size_unlock(struct inode *inode, int unlock_lsm) up(&lli->lli_size_sem); } -static void ll_replace_lsm(struct inode *inode, struct lov_stripe_md *lsm) -{ - struct ll_inode_info *lli = ll_i2info(inode); - - dump_lsm(D_INODE, lsm); - dump_lsm(D_INODE, lli->lli_smd); - LASSERTF(lsm->lsm_magic == LOV_MAGIC_JOIN, - "lsm must be joined lsm %p\n", lsm); - obd_free_memmd(ll_i2dtexp(inode), &lli->lli_smd); - CDEBUG(D_INODE, "replace lsm %p to lli_smd %p for inode %lu%u(%p)\n", - lsm, lli->lli_smd, inode->i_ino, inode->i_generation, inode); - lli->lli_smd = lsm; - lli->lli_maxbytes = lsm->lsm_maxbytes; - if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES) - lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; -} - void ll_update_inode(struct inode *inode, struct lustre_md *md) { struct ll_inode_info *lli = ll_i2info(inode); @@ -1535,8 +1515,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) if (lsm != NULL) { if (lli->lli_smd == NULL) { if (lsm->lsm_magic != LOV_MAGIC_V1 && - lsm->lsm_magic != LOV_MAGIC_V3 && - lsm->lsm_magic != LOV_MAGIC_JOIN) { + lsm->lsm_magic != LOV_MAGIC_V3) { dump_lsm(D_ERROR, lsm); LBUG(); } @@ -1552,21 +1531,17 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES) lli->lli_maxbytes = PAGE_CACHE_MAXBYTES; } else { - if (lli->lli_smd->lsm_magic == lsm->lsm_magic && - lli->lli_smd->lsm_stripe_count == - lsm->lsm_stripe_count) { - if (lov_stripe_md_cmp(lli->lli_smd, lsm)) { - CERROR("lsm mismatch for inode %ld\n", - inode->i_ino); - CERROR("lli_smd:\n"); - dump_lsm(D_ERROR, lli->lli_smd); - CERROR("lsm:\n"); - dump_lsm(D_ERROR, lsm); - LBUG(); - } - } else { - cl_inode_init(inode, md); - ll_replace_lsm(inode, lsm); + LASSERT(lli->lli_smd->lsm_magic == lsm->lsm_magic && + lli->lli_smd->lsm_stripe_count == + lsm->lsm_stripe_count); + if (lov_stripe_md_cmp(lli->lli_smd, lsm)) { + CERROR("lsm mismatch for inode %ld\n", + inode->i_ino); + CERROR("lli_smd:\n"); + dump_lsm(D_ERROR, lli->lli_smd); + CERROR("lsm:\n"); + dump_lsm(D_ERROR, lsm); + LBUG(); } } if (lli->lli_smd != lsm) @@ -2023,8 +1998,6 @@ int ll_prep_inode(struct inode **inode, } } - rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp, - ll_i2info(*inode)->lli_smd); out: md_free_lustre_md(sbi->ll_md_exp, &md); RETURN(rc); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index a5177de..187cfea 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -1106,10 +1106,6 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } LASSERT(rc >= sizeof(*lsm)); - rc = obd_checkmd(ll_i2dtexp(dir), ll_i2mdexp(dir), lsm); - if (rc) - GOTO(out_free_memmd, rc); - OBDO_ALLOC(oa); if (oa == NULL) GOTO(out_free_memmd, rc = -ENOMEM); diff --git a/lustre/lov/lov_cl_internal.h b/lustre/lov/lov_cl_internal.h index dbc63dc..2a06147 100644 --- a/lustre/lov/lov_cl_internal.h +++ b/lustre/lov/lov_cl_internal.h @@ -169,8 +169,6 @@ enum lov_layout_type { LLT_EMPTY, /** striped file */ LLT_RAID0, - /** join file */ - LLT_JOIN, LLT_NR }; @@ -239,8 +237,6 @@ struct lov_object { } raid0; struct lov_layout_state_empty { } empty; - struct lov_layout_state_join { - } join; } u; /** * Thread that acquired lov_object::lo_type_guard in an exclusive diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index 63f2dc7..aa7c299 100755 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -168,33 +168,6 @@ lsm_stripe_by_offset_plain(struct lov_stripe_md *lsm, int *stripeno, *swidth = (obd_off)lsm->lsm_stripe_size * lsm->lsm_stripe_count; } -static obd_off -lsm_stripe_offset_by_index_plain(struct lov_stripe_md *lsm, - int stripe_index) -{ - return 0; -} - -static obd_off -lsm_stripe_offset_by_offset_plain(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - return 0; -} - -static int -lsm_stripe_index_by_offset_plain(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - return 0; -} - -static int lsm_revalidate_plain(struct lov_stripe_md *lsm, - struct obd_device *obd) -{ - return 0; -} - static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa, struct obd_export *md_exp) { @@ -258,379 +231,10 @@ const struct lsm_operations lsm_v1_ops = { .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain, .lsm_stripe_by_offset = lsm_stripe_by_offset_plain, - .lsm_revalidate = lsm_revalidate_plain, - .lsm_stripe_offset_by_index = lsm_stripe_offset_by_index_plain, - .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_plain, - .lsm_stripe_index_by_offset = lsm_stripe_index_by_offset_plain, .lsm_lmm_verify = lsm_lmm_verify_v1, .lsm_unpackmd = lsm_unpackmd_v1, }; -struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off) -{ - struct lov_array_info *lai; - struct lov_extent *le; - int i = 0; - - LASSERT(lsm->lsm_array != NULL); - lai = lsm->lsm_array; - LASSERT(lai->lai_ext_count > 1); - - for (le = lai->lai_ext_array, i = 0; - i < lai->lai_ext_count && le->le_start + le->le_len <= lov_off - && le->le_len != -1; - i ++, le ++) { - ; /* empty loop */ - } - - CDEBUG(D_INFO, "off "LPU64" idx %d, ext "LPU64":"LPU64" idx %d sc %d\n", - lov_off, i, le->le_start, le->le_len, le->le_loi_idx, - le->le_stripe_count); - - RETURN(le); -} - -struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no) -{ - struct lov_extent *le; - struct lov_array_info *lai; - int i, stripe_index; - - LASSERT(lsm->lsm_array != NULL); - LASSERT(stripe_no >= 0 && stripe_no <= lsm->lsm_stripe_count); - lai = lsm->lsm_array; - LASSERT(lai->lai_ext_count > 1); - - for (le = lai->lai_ext_array, i = 0, stripe_index = le->le_stripe_count; - i < lai->lai_ext_count && stripe_index <= stripe_no && - le->le_len != -1; i ++, le ++, - stripe_index += le->le_stripe_count) { - ; /* empty loop */ - } - - CDEBUG(D_INFO, "stripe %d idx %d, ext "LPU64":"LPU64" idx %d sc %d\n", - stripe_no, i, le->le_start, le->le_len, le->le_loi_idx, - le->le_stripe_count); - RETURN(le); -} - -static void lovea_free_array_info(struct lov_stripe_md *lsm) -{ - if (!lsm || !lsm->lsm_array) - return; - - if (lsm->lsm_array->lai_ext_array) - OBD_FREE(lsm->lsm_array->lai_ext_array, - lsm->lsm_array->lai_ext_count * - sizeof(struct lov_extent)); - - OBD_FREE_PTR(lsm->lsm_array); -} - -static void lsm_free_join(struct lov_stripe_md *lsm) -{ - lovea_free_array_info(lsm); - lsm_free_plain(lsm); -} - -static void -lsm_stripe_by_index_join(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, obd_off *swidth) -{ - struct lov_extent *le; - - LASSERT(stripeno != NULL); - - le = lovea_idx2le(lsm, *stripeno); - - LASSERT(le != NULL && le->le_stripe_count != 0); - - *stripeno -= le->le_loi_idx; - - if (swidth) - *swidth = (obd_off)lsm->lsm_stripe_size * le->le_stripe_count; - - if (lov_off) { - struct lov_extent *lov_le = lovea_off2le(lsm, *lov_off); - if (lov_le == le) { - *lov_off = (*lov_off > le->le_start) ? - (*lov_off - le->le_start) : 0; - } else { - *lov_off = (*lov_off > le->le_start) ? - le->le_len : 0; - LASSERT(*lov_off != -1); - } - } -} - -static void -lsm_stripe_by_offset_join(struct lov_stripe_md *lsm, int *stripeno, - obd_off *lov_off, obd_off *swidth) -{ - struct lov_extent *le; - - LASSERT(lov_off != NULL); - - le = lovea_off2le(lsm, *lov_off); - - LASSERT(le != NULL && le->le_stripe_count != 0); - - *lov_off = (*lov_off > le->le_start) ? (*lov_off - le->le_start) : 0; - - if (stripeno) - *stripeno -= le->le_loi_idx; - - if (swidth) - *swidth = (obd_off)lsm->lsm_stripe_size * le->le_stripe_count; -} - -static obd_off -lsm_stripe_offset_by_index_join(struct lov_stripe_md *lsm, - int stripe_index) -{ - struct lov_extent *le; - - le = lovea_idx2le(lsm, stripe_index); - - return le ? le->le_start : 0; -} - -static obd_off -lsm_stripe_offset_by_offset_join(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - struct lov_extent *le; - - le = lovea_off2le(lsm, lov_off); - - return le ? le->le_start : 0; -} - -static int -lsm_stripe_index_by_offset_join(struct lov_stripe_md *lsm, - obd_off lov_off) -{ - struct lov_extent *le = NULL; - - le = lovea_off2le(lsm, lov_off); - - return le ? le->le_loi_idx : 0; -} - -static int lovea_unpack_array(struct llog_handle *handle, - struct llog_rec_hdr *rec, void *data) -{ - struct lovea_unpack_args *args = (struct lovea_unpack_args *)data; - struct llog_array_rec *la_rec = (struct llog_array_rec*)rec; - struct mds_extent_desc *med = &la_rec->lmr_med; - struct lov_stripe_md *lsm = args->lsm; - int cursor = args->cursor++; - struct lov_mds_md *lmm; - struct lov_array_info *lai; - struct lov_oinfo * loi; - int i, loi_index; - ENTRY; - - /* sanity check */ - LASSERT(lsm->lsm_stripe_count != 0); - lmm = &med->med_lmm; - LASSERT(lsm->lsm_array != NULL); - - lai = lsm->lsm_array; - - if (cursor == 0) { - lai->lai_ext_array[cursor].le_loi_idx = 0; - } else { - int next_loi_index = lai->lai_ext_array[cursor - 1].le_loi_idx + - lai->lai_ext_array[cursor - 1].le_stripe_count; - lai->lai_ext_array[cursor].le_loi_idx = next_loi_index; - } - /* insert extent desc into lsm extent array */ - lai->lai_ext_array[cursor].le_start = le64_to_cpu(med->med_start); - lai->lai_ext_array[cursor].le_len = le64_to_cpu(med->med_len); - lai->lai_ext_array[cursor].le_stripe_count = - le32_to_cpu(lmm->lmm_stripe_count); - - /* unpack extent's lmm to lov_oinfo array */ - loi_index = lai->lai_ext_array[cursor].le_loi_idx; - CDEBUG(D_INFO, "lovea upackmd cursor %d, loi_index %d extent " - LPU64":"LPU64"\n", cursor, loi_index, med->med_start, - med->med_len); - - for (i = 0; i < le32_to_cpu(lmm->lmm_stripe_count); i ++, loi_index++) { - /* XXX LOV STACKING call down to osc_unpackmd() */ - loi = lsm->lsm_oinfo[loi_index]; - loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id); - loi->loi_gr = le64_to_cpu(lmm->lmm_objects[i].l_object_gr); - loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx); - loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen); - } - - RETURN(0); -} - -static int lsm_revalidate_join(struct lov_stripe_md *lsm, - struct obd_device *obd) -{ - struct llog_handle *llh; - struct llog_ctxt *ctxt; - struct lovea_unpack_args args; - int rc, rc2; - ENTRY; - - LASSERT(lsm->lsm_array != NULL); - - /*Revalidate lsm might be called from client or MDS server. - *So the ctxt might be in different position - */ - ctxt = llog_get_context(obd, LLOG_LOVEA_REPL_CTXT); - if (!ctxt) - ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT); - - LASSERT(ctxt); - - if (lsm->lsm_array && lsm->lsm_array->lai_ext_array) - GOTO(release_ctxt, rc = 0); - - CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n", - lsm->lsm_array->lai_array_id.lgl_oid, - lsm->lsm_array->lai_array_id.lgl_ogr); - OBD_ALLOC(lsm->lsm_array->lai_ext_array,lsm->lsm_array->lai_ext_count * - sizeof (struct lov_extent)); - if (!lsm->lsm_array->lai_ext_array) - GOTO(release_ctxt, rc = -ENOMEM); - - CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n", - lsm->lsm_array->lai_array_id.lgl_oid, - lsm->lsm_array->lai_array_id.lgl_ogr); - - rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id, NULL); - if (rc) - GOTO(out, rc); - - args.lsm = lsm; - args.cursor = 0; - rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - if (rc == 0) - rc = llog_process(llh, lovea_unpack_array, &args, NULL); - rc2 = llog_close(llh); - if (rc == 0) - rc = rc2; -out: - if (rc) - lovea_free_array_info(lsm); -release_ctxt: - llog_ctxt_put(ctxt); - RETURN(rc); -} - -int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa, - struct obd_export *md_exp) -{ - struct llog_ctxt *ctxt; - struct llog_handle *llh; - int rc = 0; - ENTRY; - - LASSERT(md_exp != NULL); - /*for those orphan inode, we should keep array id*/ - if (!(oa->o_valid & OBD_MD_FLCOOKIE)) - RETURN(rc); - - ctxt = llog_get_context(md_exp->exp_obd, LLOG_LOVEA_REPL_CTXT); - if (!ctxt) - RETURN(-EINVAL); - - LASSERT(lsm->lsm_array != NULL); - rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id, - NULL); - if (rc) - GOTO(out, rc); - - rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL); - if (rc == 0) { - rc = llog_destroy(llh); - } - llog_free_handle(llh); -out: - llog_ctxt_put(ctxt); - RETURN(rc); -} - -static int lsm_lmm_verify_join(struct lov_mds_md *lmm, int lmm_bytes, - int *stripe_count) -{ - struct lov_mds_md_join *lmmj = (struct lov_mds_md_join *)lmm; - - if (lmm_bytes < sizeof(*lmmj)) { - CERROR("lov_mds_md too small: %d, need at least %d\n", - lmm_bytes, (int)sizeof(*lmmj)); - return -EINVAL; - } - - if (lmmj->lmmj_array_id.lgl_oid == 0) { - CERROR("zero array object id\n"); - return -EINVAL; - } - - *stripe_count = le32_to_cpu(lmmj->lmmj_md.lmm_stripe_count); - - return lsm_lmm_verify_common(&lmmj->lmmj_md, lmm_bytes, *stripe_count); -} - -static int lovea_init_array_info(struct lov_stripe_md *lsm, - struct llog_logid *logid, - __u32 extent_count) -{ - struct lov_array_info *lai; - ENTRY; - - OBD_ALLOC_PTR(lai); - if (!lai) - RETURN(-ENOMEM); - - lai->lai_array_id.lgl_oid = le64_to_cpu(logid->lgl_oid); - lai->lai_array_id.lgl_ogr = le64_to_cpu(logid->lgl_ogr); - lai->lai_array_id.lgl_ogen = le32_to_cpu(logid->lgl_ogen); - lai->lai_ext_count = le32_to_cpu(extent_count); - lsm->lsm_array = lai; - RETURN(0); -} - -static int lsm_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmm) -{ - struct lov_mds_md_join *lmmj = (struct lov_mds_md_join*)lmm; - int rc; - ENTRY; - - lsm_unpackmd_common(lsm, &lmmj->lmmj_md); - - rc = lovea_init_array_info(lsm, &lmmj->lmmj_array_id, - lmmj->lmmj_extent_count); - if (rc) { - CERROR("Init joined lsm id"LPU64" arrary error %d", - lsm->lsm_object_id, rc); - GOTO(out, rc); - } -out: - RETURN(rc); -} - -const struct lsm_operations lsm_join_ops = { - .lsm_free = lsm_free_join, - .lsm_destroy = lsm_destroy_join, - .lsm_stripe_by_index = lsm_stripe_by_index_join, - .lsm_stripe_by_offset = lsm_stripe_by_offset_join, - .lsm_revalidate = lsm_revalidate_join, - .lsm_stripe_offset_by_index = lsm_stripe_offset_by_index_join, - .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_join, - .lsm_stripe_index_by_offset = lsm_stripe_index_by_offset_join, - .lsm_lmm_verify = lsm_lmm_verify_join, - .lsm_unpackmd = lsm_unpackmd_join, -}; - - static int lsm_lmm_verify_v3(struct lov_mds_md *lmmv1, int lmm_bytes, int *stripe_count) { @@ -697,10 +301,6 @@ const struct lsm_operations lsm_v3_ops = { .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain, .lsm_stripe_by_offset = lsm_stripe_by_offset_plain, - .lsm_revalidate = lsm_revalidate_plain, - .lsm_stripe_offset_by_index = lsm_stripe_offset_by_index_plain, - .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_plain, - .lsm_stripe_index_by_offset = lsm_stripe_index_by_offset_plain, .lsm_lmm_verify = lsm_lmm_verify_v3, .lsm_unpackmd = lsm_unpackmd_v3, }; diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index 19e9fd3..4b17d81 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -280,18 +280,13 @@ int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, void lov_free_memmd(struct lov_stripe_md **lsmp); void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm); -void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj); void lov_dump_lmm_v3(int level, struct lov_mds_md_v3 *lmm); void lov_dump_lmm(int level, void *lmm); /* lov_ea.c */ -int lov_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm, - struct lov_mds_md *lmm); struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size); void lsm_free_plain(struct lov_stripe_md *lsm); -struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no); -struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off); int lovea_destroy_object(struct lov_obd *lov, struct lov_stripe_md *lsm, struct obdo *oa, void *data); /* lproc_lov.c */ diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index ec0eb36..6633fc1 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1161,9 +1161,8 @@ out: do { \ LASSERT((lsmp) != NULL); \ LASSERTF(((lsmp)->lsm_magic == LOV_MAGIC_V1 || \ - (lsmp)->lsm_magic == LOV_MAGIC_V3 || \ - (lsmp)->lsm_magic == LOV_MAGIC_JOIN), "%p->lsm_magic=%x\n", \ - (lsmp), (lsmp)->lsm_magic); \ + (lsmp)->lsm_magic == LOV_MAGIC_V3), \ + "%p->lsm_magic=%x\n", (lsmp), (lsmp)->lsm_magic); \ } while (0) static int lov_destroy(struct obd_export *exp, struct obdo *oa, @@ -2659,21 +2658,6 @@ static int lov_set_info_async(struct obd_export *exp, obd_count keylen, RETURN(rc); } -static int lov_checkmd(struct obd_export *exp, struct obd_export *md_exp, - struct lov_stripe_md *lsm) -{ - int rc; - ENTRY; - - if (!lsm) - RETURN(0); - LASSERT(md_exp); - LASSERT(lsm_op_find(lsm->lsm_magic) != NULL); - rc = lsm_op_find(lsm->lsm_magic)->lsm_revalidate(lsm, md_exp->exp_obd); - - RETURN(rc); -} - int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm) { int i, rc = 0; @@ -2744,7 +2728,6 @@ struct obd_ops lov_obd_ops = { .o_statfs_async = lov_statfs_async, .o_packmd = lov_packmd, .o_unpackmd = lov_unpackmd, - .o_checkmd = lov_checkmd, .o_create = lov_create, .o_destroy = lov_destroy, .o_getattr = lov_getattr, diff --git a/lustre/lov/lov_offset.c b/lustre/lov/lov_offset.c index 5e23076..ebfd376 100644 --- a/lustre/lov/lov_offset.c +++ b/lustre/lov/lov_offset.c @@ -57,7 +57,6 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size, unsigned long ssize = lsm->lsm_stripe_size; unsigned long stripe_size; obd_off swidth; - int sindex = stripeno; obd_size lov_size; int magic = lsm->lsm_magic; ENTRY; @@ -75,7 +74,6 @@ obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size, else lov_size = (ost_size - 1) * swidth + (stripeno + 1) * ssize; - lov_size += lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, sindex); RETURN(lov_size); } @@ -131,7 +129,6 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off, int stripeno, obd_off *obdoff) { unsigned long ssize = lsm->lsm_stripe_size; - __u64 l_off, s_off; obd_off stripe_off, this_stripe, swidth; int magic = lsm->lsm_magic; int ret = 0; @@ -142,23 +139,7 @@ int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off, } LASSERT(lsm_op_find(magic) != NULL); - /*It will check whether the lov_off and stripeno - *are in the same extent. - *1) lov_off extent < stripeno extent, ret = -1, obdoff = 0 - *2) lov_off extent > stripeno extent, ret = 1, - * obdoff = lov_off extent offset*/ - l_off = lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, stripeno); - s_off = lsm_op_find(magic)->lsm_stripe_offset_by_offset(lsm, lov_off); - if (s_off < l_off) { - ret = -1; - *obdoff = 0; - return ret; - } else if (s_off > l_off) { - ret = 1; - *obdoff = s_off; - return ret; - } - /*If they are in the same extent, original logic*/ + lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, &lov_off, &swidth); @@ -279,7 +260,6 @@ int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off) { unsigned long ssize = lsm->lsm_stripe_size; obd_off stripe_off, swidth; - obd_off offset = lov_off; int magic = lsm->lsm_magic; LASSERT(lsm_op_find(magic) != NULL); @@ -290,6 +270,5 @@ int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off) /* Puts stripe_off/ssize result into stripe_off */ do_div(stripe_off, ssize); - return (stripe_off + - lsm_op_find(magic)->lsm_stripe_index_by_offset(lsm, offset)); + return stripe_off; } diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c index 87b1707..0ed24bb 100644 --- a/lustre/lov/lov_pack.c +++ b/lustre/lov/lov_pack.c @@ -92,13 +92,6 @@ void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm) le32_to_cpu(lmm->lmm_stripe_count)); } -void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj) -{ - lov_dump_lmm_common(level, &lmmj->lmmj_md); - CDEBUG(level, "extent_count %u\n", - le32_to_cpu(lmmj->lmmj_extent_count)); -} - void lov_dump_lmm_v3(int level, struct lov_mds_md_v3 *lmm) { lov_dump_lmm_common(level, lmm); @@ -115,8 +108,6 @@ void lov_dump_lmm(int level, void *lmm) switch (magic) { case LOV_MAGIC_V1: return lov_dump_lmm_v1(level, (struct lov_mds_md_v1 *)(lmm)); - case LOV_MAGIC_JOIN: - return lov_dump_lmm_join(level, (struct lov_mds_md_join *)(lmm)); case LOV_MAGIC_V3: return lov_dump_lmm_v3(level, (struct lov_mds_md_v3 *)(lmm)); default: diff --git a/lustre/lov/lovsub_lock.c b/lustre/lov/lovsub_lock.c index e4ff065..66b6989 100644 --- a/lustre/lov/lovsub_lock.c +++ b/lustre/lov/lovsub_lock.c @@ -203,9 +203,6 @@ static void lovsub_lock_descr_map(const struct cl_lock_descr *in, start = in->cld_start; end = in->cld_end; - /* - * XXX join file support. - */ if (lsm->lsm_stripe_count > 1) { size = cl_index(lov2cl(obj), lsm->lsm_stripe_size); skip = (lsm->lsm_stripe_count - 1) * size; diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 2ebd5fa..0444593 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -303,19 +303,6 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private, nblocks = (LLOG_CHUNK_SIZE >> inode->i_blkbits) + FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb) * logs; break; - case FSFILT_OP_JOIN: - /* delete 2 file(file + array id) + create 1 file (array id) - * create/update logs for each stripe */ - nblocks += 2 * FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb); - - /*create array log for head file*/ - nblocks += 3; - nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)); - /*update head file array */ - nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS + - FSFILT_DATA_TRANS_BLOCKS(inode->i_sb); - break; default: CERROR("unknown transaction start op %d\n", op); LBUG(); } diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index 4489340..ac709b0 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -69,8 +69,6 @@ void mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data, void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, __u32 mode, __u64 rdev, __u32 flags, const void *data, int datalen); -void mdc_join_pack(struct ptlrpc_request *req, struct md_op_data *op_data, - __u64 head_size); void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data); void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data); void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data, diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index aea8c87..3ba6799 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -181,8 +181,6 @@ static __u32 mds_pack_open_flags(__u32 flags, __u32 mode) cr_flags |= MDS_OPEN_SYNC; if (flags & O_DIRECTORY) cr_flags |= MDS_OPEN_DIRECTORY; - if (mode & M_JOIN_FILE) - cr_flags |= MDS_OPEN_JOIN_FILE; #ifdef FMODE_EXEC if (flags & FMODE_EXEC) cr_flags |= MDS_FMODE_EXEC; @@ -194,18 +192,6 @@ static __u32 mds_pack_open_flags(__u32 flags, __u32 mode) } /* packing of MDS records */ -void mdc_join_pack(struct ptlrpc_request *req, - struct md_op_data *op_data, - __u64 head_size) -{ - struct mdt_rec_join *rec; - - rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_JOINFILE); - LASSERT(rec != NULL); - rec->jr_fid = op_data->op_fid2; - rec->jr_headsize = head_size; -} - void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, __u32 mode, __u64 rdev, __u32 flags, const void *lmm, int lmmlen) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index e7d8b7c..9b1443f 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -248,8 +248,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, struct ptlrpc_request *req; struct obd_device *obddev = class_exp2obd(exp); struct ldlm_intent *lit; - int joinfile = !!((it->it_create_mode & M_JOIN_FILE) && - op_data->op_data); CFS_LIST_HEAD(cancels); int count = 0; int mode; @@ -274,8 +272,8 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, MDS_INODELOCK_OPEN); } - /* If CREATE or JOIN_FILE, cancel parent's UPDATE lock. */ - if (it->it_op & IT_CREAT || joinfile) + /* If CREATE, cancel parent's UPDATE lock. */ + if (it->it_op & IT_CREAT) mode = LCK_EX; else mode = LCK_CR; @@ -300,10 +298,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, op_data->op_namelen + 1); req_capsule_set_size(&req->rq_pill, &RMF_EADATA, RCL_CLIENT, max(lmmsize, obddev->u.cli.cl_default_mds_easize)); - if (!joinfile) { - req_capsule_set_size(&req->rq_pill, &RMF_REC_JOINFILE, - RCL_CLIENT, 0); - } rc = ldlm_prep_enqueue_req(exp, req, &cancels, count); if (rc) { @@ -311,11 +305,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, return NULL; } - if (joinfile) { - __u64 head_size = *(__u64 *)op_data->op_data; - mdc_join_pack(req, op_data, head_size); - } - spin_lock(&req->rq_lock); req->rq_replay = req->rq_import->imp_replayable; spin_unlock(&req->rq_lock); @@ -644,17 +633,11 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, policy = *(ldlm_policy_data_t *)lmm; res_id.name[3] = LDLM_FLOCK; } else if (it->it_op & IT_OPEN) { - int joinfile = !!((it->it_create_mode & M_JOIN_FILE) && - op_data->op_data); - req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize, einfo->ei_cbdata); - if (!joinfile) { - policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; - einfo->ei_cbdata = NULL; - lmm = NULL; - } else - it->it_create_mode &= ~M_JOIN_FILE; + policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; + einfo->ei_cbdata = NULL; + lmm = NULL; } else if (it->it_op & IT_UNLINK) req = mdc_intent_unlink_pack(exp, it, op_data); else if (it->it_op & (IT_GETATTR | IT_LOOKUP)) diff --git a/lustre/mdd/mdd_lov.c b/lustre/mdd/mdd_lov.c index 086a50d..f9cdc02 100644 --- a/lustre/mdd/mdd_lov.c +++ b/lustre/mdd/mdd_lov.c @@ -698,10 +698,6 @@ int mdd_log_op_setattr(struct obd_device *obd, __u32 uid, __u32 gid, 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); @@ -772,12 +768,6 @@ static int mdd_osc_setattr_async(struct obd_device *obd, __u32 uid, __u32 gid, GOTO(out, rc); } - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, oinfo.oi_md); - if (rc) { - CERROR("Error revalidate lsm %p \n", oinfo.oi_md); - GOTO(out, rc); - } - /* then fill oa */ oinfo.oi_oa->o_uid = uid; oinfo.oi_oa->o_gid = gid; diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index 0108623..582531e 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -271,9 +271,6 @@ static int mds_llog_add_unlink(struct obd_device *obd, struct llog_ctxt *ctxt; int rc; - rc = obd_checkmd(obd->u.mds.mds_osc_exp, obd->obd_self_export, lsm); - if (rc) - RETURN(rc); /* first prepare unlink log record */ OBD_ALLOC_PTR(lur); if (!lur) @@ -323,9 +320,6 @@ int mds_log_op_orphan(struct obd_device *obd, struct lov_stripe_md *lsm, if (IS_ERR(mds->mds_osc_obd)) RETURN(PTR_ERR(mds->mds_osc_obd)); - rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm); - if (rc) - RETURN(rc); rc = mds_llog_add_unlink(obd, lsm, count - 1, &logcookie, 1); RETURN(rc); } diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 9e821f0..f98b7a7 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -970,9 +970,8 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc) LASSERT(info->mti_pill->rc_fmt == &RQF_LDLM_INTENT_OPEN); ldlm_rep = req_capsule_server_get(info->mti_pill, &RMF_DLM_REP); - /* JOIN file was deprecated since 1.6.5, but may be revived one day */ - if (create_flags & MDS_OPEN_JOIN_FILE) { - CERROR("file join is unsupported in this version of Lustre\n"); + if (unlikely(create_flags & MDS_OPEN_JOIN_FILE)) { + CERROR("file join is not supported anymore.\n"); GOTO(out, result = err_serious(-EOPNOTSUPP)); } msg_flags = lustre_msg_get_flags(req->rq_reqmsg); diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c index 8c49fc7..41ee78a 100644 --- a/lustre/obdclass/llog_swab.c +++ b/lustre/obdclass/llog_swab.c @@ -215,7 +215,6 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail) __swab32s(&lid->lid_id.lgl_ogen); break; } - case LLOG_JOIN_REC: case LLOG_PAD_MAGIC: break; diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index fb23209..2004be3 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -731,11 +731,11 @@ static const char *obd_connect_names[] = { "truncate_lock", "initial_transno", "inode_bit_locks", - "join_file", + "join_file(obsolete)", "getattr_by_fid", "no_oh_for_devices", - "local_client", "remote_client", + "remote_client_by_force", "max_byte_per_rpc", "64bit_qdata", "mds_capability", @@ -1402,7 +1402,6 @@ void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats) LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async); LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd); LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd); - LPROCFS_OBD_OP_INIT(num_private_stats, stats, checkmd); LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate); LPROCFS_OBD_OP_INIT(num_private_stats, stats, precreate); LPROCFS_OBD_OP_INIT(num_private_stats, stats, create); diff --git a/lustre/ptlrpc/layout.c b/lustre/ptlrpc/layout.c index 4e4a78c..cdc9ce6 100644 --- a/lustre/ptlrpc/layout.c +++ b/lustre/ptlrpc/layout.c @@ -385,8 +385,7 @@ static const struct req_msg_field *ldlm_intent_open_client[] = { &RMF_CAPA1, &RMF_CAPA2, &RMF_NAME, - &RMF_EADATA, - &RMF_REC_JOINFILE + &RMF_EADATA }; static const struct req_msg_field *ldlm_intent_unlink_client[] = { @@ -807,11 +806,6 @@ const struct req_msg_field RMF_REC_REINT = lustre_swab_mdt_rec_reint); 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); EXPORT_SYMBOL(RMF_EADATA); diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 82999a3..b5e3e53 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -1778,18 +1778,6 @@ void lustre_swab_fid2path(struct getinfo_fid2path *gf) } EXPORT_SYMBOL(lustre_swab_fid2path); -void lustre_swab_mds_rec_join (struct mds_rec_join *jr) -{ - __swab64s(&jr->jr_headsize); - lustre_swab_ll_fid(&jr->jr_fid); -} - -void lustre_swab_mdt_rec_join (struct mdt_rec_join *jr) -{ - __swab64s(&jr->jr_headsize); - lustre_swab_lu_fid(&jr->jr_fid); -} - void lustre_swab_mds_rec_create (struct mds_rec_create *cr) { __swab32s (&cr->cr_opcode); @@ -1975,18 +1963,6 @@ static void lustre_swab_lov_user_md_common(struct lov_user_md_v1 *lum) EXIT; } -static void print_lumj (struct lov_user_md_join *lumj) -{ - CDEBUG(D_OTHER, "lov_user_md %p:\n", lumj); - CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lumj->lmm_magic); - CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lumj->lmm_pattern); - CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lumj->lmm_object_id); - CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lumj->lmm_object_gr); - CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lumj->lmm_stripe_size); - CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lumj->lmm_stripe_count); - CDEBUG(D_OTHER, "\tlmm_extent_count: %#x\n", lumj->lmm_extent_count); -} - void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum) { ENTRY; @@ -2017,21 +1993,6 @@ void lustre_swab_lov_mds_md(struct lov_mds_md *lmm) EXIT; } -void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj) -{ - ENTRY; - CDEBUG(D_IOCTL, "swabbing lov_user_md_join\n"); - __swab32s(&lumj->lmm_magic); - __swab32s(&lumj->lmm_pattern); - __swab64s(&lumj->lmm_object_id); - __swab64s(&lumj->lmm_object_gr); - __swab32s(&lumj->lmm_stripe_size); - __swab32s(&lumj->lmm_stripe_count); - __swab32s(&lumj->lmm_extent_count); - print_lumj(lumj); - EXIT; -} - void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod, int stripe_count) { diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c index 50fec42..cab4334 100644 --- a/lustre/ptlrpc/ptlrpc_module.c +++ b/lustre/ptlrpc/ptlrpc_module.c @@ -256,8 +256,6 @@ 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); @@ -266,7 +264,6 @@ 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); diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 5ced28f..a0fc1e8 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -715,7 +715,7 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx)); CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0); - CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0); + CLASSERT(LOV_MAGIC_JOIN_V1 == 0x0BD20BD0); LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n", (long long)LOV_PATTERN_RAID0); LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", @@ -782,22 +782,6 @@ void lustre_assert_wire_constants(void) LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", (long long)LOV_PATTERN_RAID1); - /* Checks for struct lov_mds_md_join */ - LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n", - (long long)(int)sizeof(struct lov_mds_md_join)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count)); - /* Checks for struct obd_statfs */ LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n", (long long)(int)sizeof(struct obd_statfs)); @@ -1442,18 +1426,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time)); - /* Checks for struct mds_rec_join */ - LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n", - (long long)(int)sizeof(struct mds_rec_join)); - LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n", - (long long)(int)offsetof(struct mds_rec_join, jr_fid)); - LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n", - (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid)); - LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n", - (long long)(int)offsetof(struct mds_rec_join, jr_headsize)); - LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize)); - /* Checks for struct lov_desc */ LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n", (long long)(int)sizeof(struct lov_desc)); @@ -2185,38 +2157,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx)); - /* Checks for struct llog_array_rec */ - LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n", - (long long)(int)sizeof(struct llog_array_rec)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_hdr)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_med)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_tail)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail)); - - /* Checks for struct mds_extent_desc */ - LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n", - (long long)(int)sizeof(struct mds_extent_desc)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_start)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_len)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_lmm)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm)); - /* Checks for struct qunit_data */ LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n", (long long)(int)sizeof(struct qunit_data)); diff --git a/lustre/tests/sanity-nano.sh b/lustre/tests/sanity-nano.sh index 2005b0b..367356a 100755 --- a/lustre/tests/sanity-nano.sh +++ b/lustre/tests/sanity-nano.sh @@ -18,10 +18,9 @@ cmpcheck export OSTCOUNT=2 #export LOV="27c 27d 27e 27f 27g 27j 27k 27l 27m 27s 27t 27w 34f 51d 56 56g 56h" -#export JOIN="75a 75b 57c 75d 75e 75f 75g" #export CHKSUM="77a 77d 77e 77f" #export DIO="69 77d 77e 77f 78 119a 119b 119c" -#export EXCEPT="69 78 118a 129 $JOIN $CHKSUM $DIO" +#export EXCEPT="69 78 118a 129 $CHKSUM $DIO" #export EXCEPT="77f" export SLOW="yes" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 32a6421..1e49b6c 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9,8 +9,8 @@ set -e ONLY=${ONLY:-"$*"} -# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 10764 16260 -ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 65a 65e 68b 75 119d $SANITY_EXCEPT" +# bug number for skipped test: 13297 2108 9789 3637 9789 3561 12622 12653 12653 5188 16260 +ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 65a 65e 68b 119d $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! @@ -3425,113 +3425,6 @@ test_74b() { # bug 13310 } run_test 74b "ldlm_enqueue freed-export error path, touch (shouldn't LBUG)" -JOIN=${JOIN:-"lfs join"} -F75=$DIR/f75 -F128k=${F75}_128k -FHEAD=${F75}_head -FTAIL=${F75}_tail -export T75_PREP=no -test75_prep() { - [ $T75_PREP = "yes" ] && return - echo "using F75=$F75, F128k=$F128k, FHEAD=$FHEAD, FTAIL=$FTAIL" - - dd if=/dev/urandom of=${F75}_128k bs=128k count=1 || error "dd failed" - log "finished dd" - chmod 777 ${F128k} - T75_PREP=yes -} - -test_75a() { - test75_prep - - cp -p ${F128k} ${FHEAD} - log "finished cp to $FHEAD" - cp -p ${F128k} ${FTAIL} - log "finished cp to $FTAIL" - cat ${F128k} ${F128k} > ${F75}_sim_sim - - $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error" - log "finished join $FHEAD to ${F75}_sim_sim" - cmp ${FHEAD} ${F75}_sim_sim || error "${FHEAD} ${F75}_sim_sim differ" - log "finished cmp $FHEAD to ${F75}_sim_sim" - $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} still exist after join" -} -run_test 75a "TEST join file ====================================" - -test_75b() { - test75_prep - - cp -p ${F128k} ${FTAIL} - cat ${F75}_sim_sim >> ${F75}_join_sim - cat ${F128k} >> ${F75}_join_sim - $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error" - cmp ${FHEAD} ${F75}_join_sim || \ - error "${FHEAD} ${F75}_join_sim are different" - $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join" -} -run_test 75b "TEST join file 2 ==================================" - -test_75c() { - test75_prep - - cp -p ${F128k} ${FTAIL} - cat ${F128k} >> ${F75}_sim_join - cat ${F75}_join_sim >> ${F75}_sim_join - $JOIN ${FTAIL} ${FHEAD} || error "join error" - cmp ${FTAIL} ${F75}_sim_join || \ - error "${FTAIL} ${F75}_sim_join are different" - $CHECKSTAT -a ${FHEAD} || error "tail ${FHEAD} exist after join" -} -run_test 75c "TEST join file 3 ==================================" - -test_75d() { - test75_prep - - cp -p ${F128k} ${FHEAD} - cp -p ${F128k} ${FHEAD}_tmp - cat ${F75}_sim_sim >> ${F75}_join_join - cat ${F75}_sim_join >> ${F75}_join_join - $JOIN ${FHEAD} ${FHEAD}_tmp || error "join ${FHEAD} ${FHEAD}_tmp error" - $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error" - cmp ${FHEAD} ${F75}_join_join ||error "${FHEAD} ${F75}_join_join differ" $CHECKSTAT -a ${FHEAD}_tmp || error "${FHEAD}_tmp exist after join" - $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join (2)" -} -run_test 75d "TEST join file 4 ==================================" - -test_75e() { - test75_prep - - rm -rf ${FHEAD} || "delete join file error" -} -run_test 75e "TEST join file 5 (remove joined file) =============" - -test_75f() { - test75_prep - - cp -p ${F128k} ${F75}_join_10_compare - cp -p ${F128k} ${F75}_join_10 - for ((i = 0; i < 10; i++)); do - cat ${F128k} >> ${F75}_join_10_compare - cp -p ${F128k} ${FTAIL} - $JOIN ${F75}_join_10 ${FTAIL} || \ - error "join ${F75}_join_10 ${FTAIL} error" - $CHECKSTAT -a ${FTAIL} || error "tail file exist after join" - done - cmp ${F75}_join_10 ${F75}_join_10_compare || \ - error "files ${F75}_join_10 ${F75}_join_10_compare differ" -} -run_test 75f "TEST join file 6 (join 10 files) ==================" - -test_75g() { - [ ! -f ${F75}_join_10 ] && echo "${F75}_join_10 missing" && return - $LFS getstripe ${F75}_join_10 - - $OPENUNLINK ${F75}_join_10 ${F75}_join_10 || error "files unlink open" - - ls -l $F75* -} -run_test 75g "TEST join file 7 (open unlink) ====================" - num_inodes() { awk '/lustre_inode_cache/ {print $2; exit}' /proc/slabinfo } diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index f7dea03..64dfdcd 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -13,7 +13,6 @@ grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEP # Tests that fail on uml [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7" -# Join file feature is not supported currently. # It will be ported soon. EXCEPT="$EXCEPT 22" @@ -409,26 +408,6 @@ test_21() { # Bug 5907 } run_test 21 " Try to remove mountpoint on another dir ====" -JOIN=${JOIN:-"lfs join"} - -test_22() { # Bug 9926 - mkdir $DIR1/d21 - dd if=/dev/urandom of=$DIR1/d21/128k bs=1024 count=128 - cp -p $DIR1/d21/128k $DIR1/d21/f_head - for ((i=0;i<10;i++)); do - cp -p $DIR1/d21/128k $DIR1/d21/f_tail - $JOIN $DIR1/d21/f_head $DIR1/d21/f_tail || error "join error" - $CHECKSTAT -a $DIR1/d21/f_tail || error "tail file exist after join" - done - echo aaaaaaaaaaa >> $DIR1/d21/no_joined - - mv $DIR2/d21/f_head $DIR2/ - munlink $DIR2/f_head || error "unlink joined file error" - cat $DIR2/d21/no_joined || error "cat error" - rm -rf $DIR2/d21/no_joined || error "unlink normal file error" -} -run_test 22 " After joining in one dir, open/close unlink file in anther dir" - test_23() { # Bug 5972 echo "others should see updated atime while another read" > $DIR1/f23 diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 1f0f905..4e4228a 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -160,8 +160,8 @@ command_t cmdlist[] = { "\tkeywords are one of followings: config, deletions.\n" "\tnode name must be provided when use keyword config."}, {"join", lfs_join, 0, - "join two lustre files into one - join A, B, will be like cat B >> A & del B\n" - "usage: join \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" @@ -1244,37 +1244,11 @@ static int lfs_catinfo(int argc, char **argv) return rc; } -int lfs_join(int argc, char **argv) +static int lfs_join(int argc, char **argv) { - char *name_head, *name_tail; - int fd, rc; - loff_t size; - - if (argc != 3) - return CMD_HELP; - name_head = argv[1]; - fd = open(name_head, O_WRONLY); - if (fd < 0) { - fprintf(stderr, "Can not open name_head %s rc=%d\n", - name_head, fd); - return fd; - } - size = lseek(fd, 0, SEEK_END); - if (size % JOIN_FILE_ALIGN) { - fprintf(stderr,"head file %s size %llu must be mutiple of %d\n", - name_head, (long long)size, JOIN_FILE_ALIGN); - rc = -EINVAL; - goto out; - } - name_tail = argv[2]; - rc = ioctl(fd, LL_IOC_JOIN, name_tail); -out: - close(fd); - if (rc) { - fprintf(stderr, "Lustre joining files: %s, %s, failed\n", - argv[1], argv[2]); - } - return rc; + fprintf(stderr, "join two lustre files into one.\n" + "obsolete, HEAD does not support it anymore.\n"); + return 0; } #ifdef HAVE_SYS_QUOTA_H diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index d0ae79a..33a9f46 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -1142,68 +1142,6 @@ void lov_dump_user_lmm_v1v3(struct lov_user_md *lum, char *pool_name, } } -void lov_dump_user_lmm_join(struct lov_user_md_v1 *lum, char *path, - int is_dir, int obdindex, int quiet, - int header, int body) -{ - struct lov_user_md_join *lumj = (struct lov_user_md_join *)lum; - int i, obdstripe = 0; - - if (obdindex != OBD_NOT_FOUND) { - for (i = 0; i < lumj->lmm_stripe_count; i++) { - if (obdindex == lumj->lmm_objects[i].l_ost_idx) { - llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path); - obdstripe = 1; - break; - } - } - } else { - if (!quiet) - llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path); - obdstripe = 1; - } - - if (header && obdstripe == 1) { - 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 (body) { - unsigned long long start = -1, end = 0; - if (!quiet && obdstripe == 1) - llapi_printf(LLAPI_MSG_NORMAL, - "joined\tobdidx\t\t objid\t\tobjid\t\t " - "group\t\tstart\t\tend\n"); - for (i = 0; i < lumj->lmm_stripe_count; i++) { - int idx = lumj->lmm_objects[i].l_ost_idx; - long long oid = lumj->lmm_objects[i].l_object_id; - long long gr = lumj->lmm_objects[i].l_object_gr; - if (obdindex == OBD_NOT_FOUND || obdindex == idx) - llapi_printf(LLAPI_MSG_NORMAL, - "\t%6u\t%14llu\t%#13llx\t%14llu%s", - idx, oid, oid, gr, - obdindex == idx ? " *" : ""); - if (start != lumj->lmm_objects[i].l_extent_start || - end != lumj->lmm_objects[i].l_extent_end) { - start = lumj->lmm_objects[i].l_extent_start; - llapi_printf(LLAPI_MSG_NORMAL,"\t%14llu",start); - end = lumj->lmm_objects[i].l_extent_end; - if (end == (unsigned long long)-1) - llapi_printf(LLAPI_MSG_NORMAL, - "\t\tEOF\n"); - else - llapi_printf(LLAPI_MSG_NORMAL, - "\t\t%llu\n", end); - } else { - llapi_printf(LLAPI_MSG_NORMAL, "\t\t\t\t\n"); - } - } - llapi_printf(LLAPI_MSG_NORMAL, "\n"); - } -} - void llapi_lov_dump_user_lmm(struct find_param *param, char *path, int is_dir) { @@ -1216,12 +1154,6 @@ void llapi_lov_dump_user_lmm(struct find_param *param, 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)); - break; case LOV_USER_MAGIC_V3: { char pool_name[LOV_MAXPOOLNAME + 1]; struct lov_user_ost_data_v1 *objects; @@ -1241,8 +1173,7 @@ void llapi_lov_dump_user_lmm(struct find_param *param, 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; } } diff --git a/lustre/utils/req-layout.c b/lustre/utils/req-layout.c index e5fd0f8..74bdb0b 100644 --- a/lustre/utils/req-layout.c +++ b/lustre/utils/req-layout.c @@ -64,7 +64,6 @@ #define lustre_swab_mdt_rec_reint NULL #define lustre_swab_lustre_capa NULL #define lustre_swab_lustre_capa_key NULL -#define lustre_swab_mdt_rec_join NULL #define lustre_swab_llogd_conn_body NULL #define lustre_swab_llog_hdr NULL #define lustre_swab_llogd_body NULL diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index f658c5e..c09f2eb 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -339,16 +339,6 @@ check_lov_mds_md_v1(void) } 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(); @@ -660,15 +650,6 @@ check_mds_rec_rename(void) } static void -check_mds_rec_join(void) -{ - BLANK_LINE(); - CHECK_STRUCT(mds_rec_join); - CHECK_MEMBER(mds_rec_join, jr_fid); - CHECK_MEMBER(mds_rec_join, jr_headsize); -} - -static void check_lov_desc(void) { BLANK_LINE(); @@ -1054,16 +1035,6 @@ check_llogd_conn_body(void) } static void -check_mds_extent_desc(void) -{ - BLANK_LINE(); - CHECK_STRUCT(mds_extent_desc); - CHECK_MEMBER(mds_extent_desc, med_start); - CHECK_MEMBER(mds_extent_desc, med_len); - CHECK_MEMBER(mds_extent_desc, med_lmm); -} - -static void check_llog_array_rec(void) { BLANK_LINE(); @@ -1426,7 +1397,6 @@ main(int argc, char **argv) check_obdo(); check_lov_mds_md_v1(); check_lov_mds_md_v3(); - check_lov_mds_md_join(); check_obd_statfs(); check_obd_ioobj(); check_obd_quotactl(); @@ -1440,7 +1410,6 @@ main(int argc, char **argv) check_mds_rec_link(); check_mds_rec_unlink(); check_mds_rec_rename(); - check_mds_rec_join(); check_lov_desc(); check_ldlm_res_id(); check_ldlm_extent(); @@ -1473,7 +1442,6 @@ main(int argc, char **argv) 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(); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 22d7e10..f68f766 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -712,7 +712,7 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx)); CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0); - CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0); + CLASSERT(LOV_MAGIC_JOIN_V1 == 0x0BD20BD0); LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n", (long long)LOV_PATTERN_RAID0); LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", @@ -779,22 +779,6 @@ void lustre_assert_wire_constants(void) LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n", (long long)LOV_PATTERN_RAID1); - /* Checks for struct lov_mds_md_join */ - LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n", - (long long)(int)sizeof(struct lov_mds_md_join)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id)); - LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n", - (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count)); - LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n", - (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count)); - /* Checks for struct obd_statfs */ LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n", (long long)(int)sizeof(struct obd_statfs)); @@ -1439,18 +1423,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n", (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time)); - /* Checks for struct mds_rec_join */ - LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n", - (long long)(int)sizeof(struct mds_rec_join)); - LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n", - (long long)(int)offsetof(struct mds_rec_join, jr_fid)); - LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n", - (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid)); - LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n", - (long long)(int)offsetof(struct mds_rec_join, jr_headsize)); - LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize)); - /* Checks for struct lov_desc */ LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n", (long long)(int)sizeof(struct lov_desc)); @@ -2182,38 +2154,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n", (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx)); - /* Checks for struct llog_array_rec */ - LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n", - (long long)(int)sizeof(struct llog_array_rec)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_hdr)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_med)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med)); - LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n", - (long long)(int)offsetof(struct llog_array_rec, lmr_tail)); - LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n", - (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail)); - - /* Checks for struct mds_extent_desc */ - LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n", - (long long)(int)sizeof(struct mds_extent_desc)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_start)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_len)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len)); - LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n", - (long long)(int)offsetof(struct mds_extent_desc, med_lmm)); - LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n", - (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm)); - /* Checks for struct qunit_data */ LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n", (long long)(int)sizeof(struct qunit_data)); -- 1.8.3.1