diff --git a/config.save b/config.save index 5e30d8c..f58ffa7 100755 --- a/config.save +++ b/config.save @@ -525,7 +525,7 @@ s,@ECHO_C@,,;t t s,@ECHO_N@,-n,;t t s,@ECHO_T@,,;t t s,@LIBS@, -lcrypto -lssl -ldl,;t t -s,@PVFS2_VERSION@,2.8.6-orangefs-2012-10-03-152301,;t t +s,@PVFS2_VERSION@,2.8.6-orangefs-2012-10-11-023730,;t t s,@PVFS2_VERSION_MAJOR@,2,;t t s,@PVFS2_VERSION_MINOR@,8,;t t s,@PVFS2_VERSION_SUB@,6,;t t diff --git a/src/apps/admin/pvfs2-ls.c b/src/apps/admin/pvfs2-ls.c index 1282147..75abcc3 100644 --- a/src/apps/admin/pvfs2-ls.c +++ b/src/apps/admin/pvfs2-ls.c @@ -306,7 +306,6 @@ void print_entry_attr( if ((attr->objtype == PVFS_TYPE_METAFILE) && (attr->mask & PVFS_ATTR_SYS_SIZE)) { - printf("in_here\n"); size = attr->size; } else if ((attr->objtype == PVFS_TYPE_SYMLINK) && @@ -1094,7 +1093,6 @@ static void usage(int argc, char** argv) int main(int argc, char **argv) { - printf("START_LIST\n"); int ret = -1, i = 0; char pvfs_path[MAX_NUM_PATHS][PVFS_NAME_MAX]; PVFS_fs_id fs_id_array[MAX_NUM_PATHS] = {0}; diff --git a/src/apps/admin/pvfs2-mkdir.c b/src/apps/admin/pvfs2-mkdir.c index 53ea953..9872bab 100644 --- a/src/apps/admin/pvfs2-mkdir.c +++ b/src/apps/admin/pvfs2-mkdir.c @@ -292,6 +292,19 @@ static int make_directory(PVFS_credentials * credentials, parent_ref.handle = resp_lookup.ref.handle; parent_ref.fs_id = resp_lookup.ref.fs_id; + /* Clear out any info from previous calls */ + memset(&resp_lookup, 0, sizeof(resp_lookup)); + + ret = PVFS_sys_ref_lookup(fs_id, basename_ptr, + parent_ref, credentials, &resp_lookup, + PVFS2_LOOKUP_LINK_FOLLOW, NULL); + + if( ret == 0) + { + fprintf(stderr, "directory exists\n"); + return(-1); + } + /* Clear out any info from previous calls */ memset(&resp_mkdir, 0, sizeof(PVFS_sysresp_mkdir)); diff --git a/src/client/sysint/sys-create.sm b/src/client/sysint/sys-create.sm index 4741654..520ccc7 100644 --- a/src/client/sysint/sys-create.sm +++ b/src/client/sysint/sys-create.sm @@ -394,6 +394,7 @@ PVFS_error PVFS_sys_create( static PINT_sm_action create_init( struct PINT_smcb *smcb, job_status_s *js_p) { + gossip_err("create_init\n"); struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); job_id_t tmp_id; @@ -577,9 +578,9 @@ static int create_datafiles_comp_fn(void *v_p, gossip_err("create_oid: %d\n", oid); - if (oid < first || oid > last) + /*if (oid < first || oid > last) gossip_err("%s: OSD-assigned oid %llu out of range %llu-%llu\n", - __func__, llu(oid), llu(first), llu(last)); + __func__, llu(oid), llu(first), llu(last));*/ /* The first datafile also happens to be the metafile */ if (is_osd_md && index == 0) { diff --git a/src/client/sysint/sys-osd-dir.sm b/src/client/sysint/sys-osd-dir.sm index 0512897..b425567 100644 --- a/src/client/sysint/sys-osd-dir.sm +++ b/src/client/sysint/sys-osd-dir.sm @@ -1064,7 +1064,6 @@ static PINT_sm_action osd_dirops_attr4_setup_insert_remove_msgpair( attr.number = jenkins_one_at_a_time_hash((uint8_t *)object_name, strlen(object_name) + 1); - gossip_err("sertac: %d\n", attr.number); ret = osd_command_set_set_attributes(command, PVFS_OSD_META_PID, oid); if (ret) { diff --git a/src/client/sysint/sys-readdir.sm b/src/client/sysint/sys-readdir.sm index cb56df5..207625b 100644 --- a/src/client/sysint/sys-readdir.sm +++ b/src/client/sysint/sys-readdir.sm @@ -220,7 +220,6 @@ PVFS_error PVFS_sys_readdir( static PINT_sm_action readdir_init( struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("readdir_init\n"); struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); gossip_debug(GOSSIP_CLIENT_DEBUG, "readdir state: init\n"); @@ -239,7 +238,6 @@ static PINT_sm_action readdir_init( static PINT_sm_action readdir_msg_setup_msgpair( struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("readdir_msg_setup_msgpair\n"); struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -PVFS_EINVAL; PINT_sm_msgpair_state *msg_p = NULL; @@ -296,6 +294,8 @@ static PINT_sm_action readdir_msg_setup_msgpair( /* Retrieve the attributes of the collection object */ /* Retrieved attribute numbers are the hashed name of each directory entry */ + /*ret = osd_command_set_list_collection(command, PVFS_OSD_META_PID, oid, 0, 1024, 0, 0);*/ + ret = osd_command_set_get_attributes(command, PVFS_OSD_META_PID, oid); if (ret) { osd_error_xerrno(ret, "%s: osd_command_set_get_attributes failed", @@ -334,6 +334,7 @@ static int readdir_msg_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { + osd_debug("readdir_msg_comp_fn\n"); int ret = 0; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); @@ -357,6 +358,8 @@ static int readdir_msg_comp_fn(void *v_p, return ret; } + //ret = osd_command_list_collection_resolve(command); + /* * XXX readdir.token and readdir.directory_version are used when we * use multiple passes to retrieve the dirents. For now, we retrieve diff --git a/src/client/sysint/sys-readdirplus.sm b/src/client/sysint/sys-readdirplus.sm index 19f705f..9f3f61d 100644 --- a/src/client/sysint/sys-readdirplus.sm +++ b/src/client/sysint/sys-readdirplus.sm @@ -415,7 +415,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) PVFS_sysresp_readdirplus *readdirplus_resp = sm_p->u.readdirplus.readdirplus_resp; int i, ret, err_array_len, attr_array_len; - gossip_err("LIST_OF_META_SERVERS\n"); int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); assert(readdirplus_resp); err_array_len = (sizeof(PVFS_error) * @@ -502,7 +501,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) static PINT_sm_action readdirplus_fetch_attrs_setup_msgpair(struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("readdirplus_fetch_attrs_setup_msgpair\n"); int i, ret; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PINT_sm_msgpair_state *msg_p = NULL; @@ -649,7 +647,6 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { - gossip_err("readdirplus_fetch_attrs_comp_fn\n"); int ret, status; PVFS_object_attr *attr = NULL; PINT_smcb *smcb = v_p; @@ -705,7 +702,6 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, return ret; } - gossip_err("cem: %d\n", sm_p->u.readdirplus.handle_count[index]); if (sm_p->u.readdirplus.handle_count[index] > 1) { for (i = 0; i < sm_p->u.readdirplus.handle_count[index]; i++) { @@ -715,7 +711,6 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, &handle_index, NULL); assert(handle_index >= 0); - gossip_err("handle_index: %d\n", handle_index); memcpy(&sm_p->u.readdirplus.obj_attr_array[handle_index].owner, ((struct attribute_get_multi_results *)attr[0].val)->val[((struct attribute_get_multi_results *)attr[0].val)->numoid-(sm_p->u.readdirplus.nhandles-i)], ((struct attribute_get_multi_results *)attr[0].val)->outlen[((struct attribute_get_multi_results *)attr[0].val)->numoid-(sm_p->u.readdirplus.nhandles-i)]); @@ -731,7 +726,6 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, sm_p->u.readdirplus.handles[index][0], &handle_index, NULL); - gossip_err("handle_index: %d\n", handle_index); /* memcpy the attributes from osd_command attr to sm_p attr object */ if (*(PVFS_ds_type*)command->attr[4].val == PVFS_TYPE_DIRECTORY) { @@ -799,7 +793,6 @@ static int list_of_data_servers(PINT_client_sm *sm_p) { int i, ret, nhandles; - gossip_err("LIST_OF_DATA_SERVERS\n"); sm_p->u.readdirplus.svr_count = 0; sm_p->u.readdirplus.server_addresses = NULL; sm_p->u.readdirplus.handles = NULL; @@ -884,7 +877,6 @@ static int list_of_data_servers(PINT_client_sm *sm_p) static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("readdirplus_fetch_sizes_setup_msgpair\n"); int i, ret; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PINT_sm_msgpair_state *msg_p; @@ -911,7 +903,6 @@ static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( js_p->error_code = ret; return SM_ACTION_COMPLETE; } - gossip_err("sm_p->u.readdirplus.svr_count: %d\n", sm_p->u.readdirplus.svr_count); if (sm_p->u.readdirplus.svr_count == 0) { /* no need to contact any server since there are no regular meta files */ @@ -1030,8 +1021,6 @@ static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( ret = osd_command_set_get_attributes(command, PVFS_OSD_DATA_PID, sm_p->u.readdirplus.input_handle_array[i].handle); - gossip_err("oid: %d\n", sm_p->u.readdirplus.input_handle_array[i].handle); - if (ret) { osd_error_xerrno(ret, "%s: osd_command_set_get_attributes failed", @@ -1087,7 +1076,6 @@ static int readdirplus_fetch_sizes_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { - gossip_err("fetch_sizes_comp_fn\n"); PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); PVFS_error status; @@ -1209,8 +1197,6 @@ static int readdirplus_fetch_sizes_comp_fn(void *v_p, sm_p->msgarray_op.msgarray[index].handle, &handle_index, &aux_index); - gossip_err("handle_index: %d\n", handle_index); - gossip_err("aux_index: %d\n", aux_index); //sm_p->u.readdirplus.size_array[handle_index][aux_index] = get_ntohll(command->attr[10].val); /* memcpy the attributes from osd_command attr to sm_p attr object */ @@ -1267,7 +1253,6 @@ static PINT_sm_action readdirplus_msg_failure( static PINT_sm_action readdirplus_cleanup( struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("readdirplus_cleanup\n"); int i; PVFS_sysresp_readdirplus *readdirplus_resp; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); diff --git a/src/common/misc/server-config.c b/src/common/misc/server-config.c index a64a6ac..8f7733d 100644 --- a/src/common/misc/server-config.c +++ b/src/common/misc/server-config.c @@ -125,6 +125,7 @@ static DOTCONF_CB(get_osd_type); static DOTCONF_CB(get_osd_dir_type); static DOTCONF_CB(get_create_type); static DOTCONF_CB(get_member_attr_type); +static DOTCONF_CB(get_coll_object_type); static DOTCONF_CB(get_eco_type); static DOTCONF_CB(get_eco_num); static DOTCONF_CB(get_small_file_size); @@ -1024,6 +1025,11 @@ static const configoption_t options[] = * Specifies if getting member attributes is enabled or not */ { "MemberAttr", ARG_STR, get_member_attr_type, NULL, CTX_DEFAULTS, "no" }, + + /* + * Specifies if collection object should be used as a dir object or not + */ + { "CollectionObject", ARG_STR, get_coll_object_type, NULL, CTX_DEFAULTS, "no" }, /* * Specifies if energy saving mode is enabled or not @@ -3060,6 +3066,21 @@ static DOTCONF_CB(get_member_attr_type) return ret; } +static DOTCONF_CB(get_coll_object_type) +{ + const char *str = cmd->data.str; + struct server_configuration_s *config = cmd->context; + const char *ret = NULL; + + if (!strcmp(str, "no")) + config->coll_object = NO_COLL_OBJECT; + else if (!strcmp(str, "yes")) + config->coll_object = COLL_OBJECT; + else + ret = "get_coll_object_type: unknown FileSystem CollectionObject option\n"; + return ret; +} + static DOTCONF_CB(get_eco_type) { const char *str = cmd->data.str; diff --git a/src/common/misc/server-config.h b/src/common/misc/server-config.h index e64c9f1..12c7fbd 100644 --- a/src/common/misc/server-config.h +++ b/src/common/misc/server-config.h @@ -225,7 +225,11 @@ typedef struct server_configuration_s NO_MEMBER_ATTR, /* fetch attributes of a single object at once */ GET_MEMBER_ATTR, /* fetch attributes of all the objects that are members of a collection */ } member_attr; - + + enum { + NO_COLL_OBJECT, /* do not use the collection objects as directories */ + COLL_OBJECT, /* use the collection objects as directories */ + } coll_object; enum { NO_ENERGY_SAVING, /* fetch attributes of a single object at once */ ENERGY_SAVING, /* fetch attributes of all the objects that are members of a collection */