Changeset 8935
- Timestamp:
- 07/12/11 10:49:42 (23 months ago)
- Location:
- branches/orange-next
- Files:
-
- 59 modified
-
configure (modified) (1 diff)
-
configure.in (modified) (1 diff)
-
include/pvfs2-mgmt.h (modified) (2 diffs)
-
include/pvfs2-sysint.h (modified) (7 diffs)
-
pvfs2-config.h.in (modified) (1 diff)
-
src/apps/admin/pvfs2-ls.c (modified) (1 diff)
-
src/client/sysint/acache.c (modified) (1 diff)
-
src/client/sysint/client-state-machine.h (modified) (4 diffs)
-
src/client/sysint/fs-add.sm (modified) (1 diff)
-
src/client/sysint/mgmt-create-dirent.sm (modified) (3 diffs)
-
src/client/sysint/mgmt-event-mon-list.sm (modified) (1 diff)
-
src/client/sysint/mgmt-get-dirdata-handle.sm (modified) (3 diffs)
-
src/client/sysint/mgmt-iterate-handles-list.sm (modified) (9 diffs)
-
src/client/sysint/mgmt-perf-mon-list.sm (modified) (1 diff)
-
src/client/sysint/mgmt-remove-dirent.sm (modified) (2 diffs)
-
src/client/sysint/mgmt-remove-object.sm (modified) (2 diffs)
-
src/client/sysint/mgmt-statfs-list.sm (modified) (1 diff)
-
src/client/sysint/ncache.c (modified) (6 diffs)
-
src/client/sysint/pint-sysint-utils.c (modified) (2 diffs)
-
src/client/sysint/remove.sm (modified) (2 diffs)
-
src/client/sysint/server-get-config.sm (modified) (1 diff)
-
src/client/sysint/sys-create.sm (modified) (10 diffs)
-
src/client/sysint/sys-del-eattr.sm (modified) (2 diffs)
-
src/client/sysint/sys-flush.sm (modified) (3 diffs)
-
src/client/sysint/sys-get-eattr.sm (modified) (2 diffs)
-
src/client/sysint/sys-getattr.sm (modified) (10 diffs)
-
src/client/sysint/sys-io.sm (modified) (6 diffs)
-
src/client/sysint/sys-list-eattr.sm (modified) (10 diffs)
-
src/client/sysint/sys-lookup.sm (modified) (6 diffs)
-
src/client/sysint/sys-mkdir.sm (modified) (7 diffs)
-
src/client/sysint/sys-readdir.sm (modified) (10 diffs)
-
src/client/sysint/sys-readdirplus.sm (modified) (10 diffs)
-
src/client/sysint/sys-remove.sm (modified) (4 diffs)
-
src/client/sysint/sys-rename.sm (modified) (9 diffs)
-
src/client/sysint/sys-set-eattr.sm (modified) (2 diffs)
-
src/client/sysint/sys-setattr.sm (modified) (2 diffs)
-
src/client/sysint/sys-small-io.sm (modified) (8 diffs)
-
src/client/sysint/sys-symlink.sm (modified) (8 diffs)
-
src/client/sysint/sys-truncate.sm (modified) (3 diffs)
-
src/common/misc/fsck-utils.c (modified) (21 diffs)
-
src/common/misc/mkspace.c (modified) (12 diffs)
-
src/common/misc/mmap-ra-cache.c (modified) (1 diff)
-
src/common/misc/pint-cached-config.c (modified) (9 diffs)
-
src/common/misc/server-config.c (modified) (8 diffs)
-
src/io/job/job.c (modified) (4 diffs)
-
src/io/job/job.h (modified) (2 diffs)
-
src/io/trove/trove-dbpf/dbpf-dspace.c (modified) (8 diffs)
-
src/io/trove/trove-handle-mgmt/module.mk.in (modified) (1 diff)
-
src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c (modified) (4 diffs)
-
src/io/trove/trove-handle-mgmt/trove-handle-mgmt.h (modified) (2 diffs)
-
src/io/trove/trove-internal.h (modified) (2 diffs)
-
src/io/trove/trove.c (modified) (4 diffs)
-
src/io/trove/trove.h (modified) (2 diffs)
-
src/proto/pvfs2-req-proto.h (modified) (21 diffs)
-
src/server/batch-create.sm (modified) (1 diff)
-
src/server/create-immutable-copies.sm (modified) (1 diff)
-
src/server/create.sm (modified) (2 diffs)
-
src/server/mkdir.sm (modified) (2 diffs)
-
src/server/pvfs2-server.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/orange-next/configure
r8929 r8935 11495 11495 fi 11496 11496 11497 for ac_header 11498 do : 11499 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 11500 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 11501 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 11502 cat >>confdefs.h <<_ACEOF 11503 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 11504 _ACEOF 11505 11506 fi 11507 11508 done 11509 11510 for ac_header in uuid/uuid.h 11511 do : 11512 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" 11513 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : 11514 cat >>confdefs.h <<_ACEOF 11515 #define HAVE_UUID_UUID_H 1 11516 _ACEOF 11517 LDFLAGS="$LDFLAGS -luuid" 11518 SERVER_LDFLAGS="$LDFLAGS -luuid" 11519 11520 fi 11521 11522 done 11523 11524 11497 11525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU-style strerror_r" >&5 11498 11526 $as_echo_n "checking for GNU-style strerror_r... " >&6; } -
branches/orange-next/configure.in
r8929 r8935 1104 1104 AC_MSG_RESULT(no) 1105 1105 fi 1106 1107 dnl check for uuid 1108 AC_CHECK_HEADERS 1109 AC_CHECK_HEADERS(uuid/uuid.h, 1110 LDFLAGS="$LDFLAGS -luuid" 1111 ) 1106 1112 1107 1113 dnl Which form of strerror? -
branches/orange-next/include/pvfs2-mgmt.h
r8891 r8935 274 274 PVFS_handle **handle_matrix, 275 275 int *handle_count_array, 276 PVFS_ds_position *position_array, 276 PVFS_ds_position *ds_position_array, 277 PVFS_kv_position *kv_position_array, 278 unsigned int *position_flag_array, 277 279 PVFS_BMI_addr_t *addr_array, 278 280 int server_count, … … 288 290 PVFS_handle **handle_matrix, 289 291 int *handle_count_array, 290 PVFS_ds_position *position_array, 292 PVFS_ds_position *ds_position_array, 293 PVFS_kv_position *kv_position_array, 294 unsigned int *position_flag_array, 291 295 PVFS_BMI_addr_t *addr_array, 292 296 int server_count, -
branches/orange-next/include/pvfs2-sysint.h
r8933 r8935 213 213 struct PVFS_sysresp_listeattr_s 214 214 { 215 PVFS_ds_position token; 215 PVFS_kv_position token; 216 uint32_t token_flag; 216 217 int32_t nkey; 217 218 PVFS_ds_keyval *key_array; … … 333 334 PVFS_object_ref ref, 334 335 PVFS_kv_position token, 335 uint32_t token_flag,336 uint32_t *token_flag_p, 336 337 int32_t pvfs_dirent_incount, 337 338 const PVFS_credentials *credentials, … … 343 344 PVFS_error PVFS_sys_readdir( 344 345 PVFS_object_ref ref, 345 PVFS_ds_position token, 346 PVFS_kv_position token, 347 uint32_t *token_flag_p, 346 348 int32_t pvfs_dirent_incount, 347 349 const PVFS_credentials *credentials, … … 351 353 PVFS_error PVFS_isys_readdirplus( 352 354 PVFS_object_ref ref, 353 PVFS_ds_position token, 355 PVFS_kv_position token, 356 uint32_t *token_flag_p, 354 357 int32_t pvfs_dirent_incount, 355 358 const PVFS_credentials *credentials, … … 363 366 PVFS_object_ref ref, 364 367 PVFS_kv_position token, 368 uint32_t *token_flag_p, 365 369 int32_t pvfs_dirent_incount, 366 370 const PVFS_credentials *credentials, … … 629 633 PVFS_error PVFS_isys_listeattr( 630 634 PVFS_object_ref ref, 631 PVFS_ds_position token, 635 PVFS_kv_position token, 636 uint32_t token_flag, 632 637 int32_t nkey, 633 638 const PVFS_credentials *credentials, … … 639 644 PVFS_error PVFS_sys_listeattr( 640 645 PVFS_object_ref ref, 641 PVFS_ds_position token, 646 PVFS_kv_position token, 647 uint32_t token_flag, 642 648 int32_t nkey, 643 649 const PVFS_credentials *credentials, -
branches/orange-next/pvfs2-config.h.in
r8842 r8935 467 467 /* Define if file_operations struct has unlocked_ioctl member */ 468 468 #undef HAVE_UNLOCKED_IOCTL_HANDLER 469 470 /* Define to 1 if you have the <uuid/uuid.h> header file. */ 471 #undef HAVE_UUID_UUID_H 469 472 470 473 /* Define if include file valgrind.h exists */ -
branches/orange-next/src/apps/admin/pvfs2-ls.c
r8317 r8935 440 440 * the old fashioned way 441 441 */ 442 ref.handle = handle;442 PVFS_handle_copy(ref.handle, handle); 443 443 ref.fs_id = fs_id; 444 444 -
branches/orange-next/src/client/sysint/acache.c
r8861 r8935 789 789 PVFS_object_ref* real_key = (PVFS_object_ref*)key; 790 790 int tmp_ret = 0; 791 792 tmp_ret = (real_key->handle)%table_size; 791 long unsigned int h_hash = 0; 792 793 PVFS_handle_to_hash(real_key->handle, &h_hash); 794 795 tmp_ret = h_hash % table_size; 793 796 return(tmp_ret); 794 797 } -
branches/orange-next/src/client/sysint/client-state-machine.h
r8933 r8935 394 394 PVFS_handle **handle_matrix; 395 395 int *handle_count_array; 396 PVFS_ds_position *position_array; 396 PVFS_ds_position *ds_position_array; 397 PVFS_kv_position *kv_position_array; 398 unsigned int *position_flag_array; 397 399 PVFS_error_details *details; 398 400 int flags; … … 466 468 } PINT_sm_getattr_state; 467 469 468 #define PINT_SM_GETATTR_STATE_FILL(_state, _objref, _mask, _reftype, _flags) \469 do { \470 memset(&(_state), 0, sizeof(PINT_sm_getattr_state)); \471 (_state).object_ref.fs_id = (_objref).fs_id; \472 (_state).object_ref.handle = (_objref).handle;\473 (_state).req_attrmask = _mask; \474 (_state).ref_type = _reftype; \475 (_state).flags = _flags; \470 #define PINT_SM_GETATTR_STATE_FILL(_state, _objref, _mask, _reftype, _flags) \ 471 do { \ 472 memset(&(_state), 0, sizeof(PINT_sm_getattr_state)); \ 473 (_state).object_ref.fs_id = (_objref).fs_id; \ 474 PVFS_handle_copy((_state).object_ref.handle, (_objref).handle); \ 475 (_state).req_attrmask = _mask; \ 476 (_state).ref_type = _reftype; \ 477 (_state).flags = _flags; \ 476 478 } while(0) 477 479 … … 518 520 struct PINT_client_listeattr_sm 519 521 { 520 PVFS_ds_position pos_token; /* input parameter */ 522 PVFS_kv_position pos_token; /* input parameter */ 523 uint32_t pos_token_flag; /* input parameter */ 521 524 int32_t nkey; /* input parameter */ 522 525 PVFS_size *size_array; /* Input/Output */ … … 544 547 PVFS_dirent **dirent_array; 545 548 uint32_t *dirent_outcount; 546 PVFS_ds_position *token; 549 PVFS_kv_position *token; 550 uint32_t *token_flag; /* out parameter */ 547 551 uint64_t *directory_version; 548 PVFS_ds_position pos_token; /* input parameter */ 552 PVFS_kv_position pos_token; /* input parameter */ 553 uint32_t pos_token_flag; /* input paramter */ 549 554 int32_t dirent_limit; /* input parameter */ 550 555 } PINT_sm_readdir_state; -
branches/orange-next/src/client/sysint/fs-add.sm
r8317 r8935 634 634 635 635 msg_p->fs_id = PVFS_FS_ID_NULL; 636 msg_p->handle = PVFS_HANDLE_NULL;636 PVFS_handle_clear(msg_p->handle); 637 637 /* only try once to retrieve a config file from each server */ 638 638 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; -
branches/orange-next/src/client/sysint/mgmt-create-dirent.sm
r7471 r8935 80 80 "PVFS_imgmt_create_dirent entered\n"); 81 81 82 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||82 if ((PVFS_handle_is_null(parent_ref.handle)) || 83 83 (parent_ref.fs_id == PVFS_FS_ID_NULL) || 84 ( entry_handle == PVFS_HANDLE_NULL) || !entry)84 (PVFS_handle_is_null(entry_handle)) || !entry) 85 85 { 86 86 gossip_err("invalid (NULL) required argument\n"); … … 103 103 sm_p->parent_ref = parent_ref; 104 104 sm_p->u.mgmt_create_dirent.entry = entry; 105 sm_p->u.mgmt_create_dirent.entry_handle = entry_handle;105 PVFS_handle_copy(sm_p->u.mgmt_create_dirent.entry_handle, entry_handle); 106 106 PVFS_hint_copy(hints, &sm_p->hints); 107 107 … … 191 191 192 192 msg_p->fs_id = sm_p->parent_ref.fs_id; 193 msg_p->handle = sm_p->parent_ref.handle;193 PVFS_handle_copy(msg_p->handle, sm_p->parent_ref.handle); 194 194 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 195 195 msg_p->comp_fn = mgmt_create_dirent_comp_fn; -
branches/orange-next/src/client/sysint/mgmt-event-mon-list.sm
r7471 r8935 175 175 176 176 msg_p->fs_id = sm_p->u.event_mon_list.fs_id; 177 msg_p->handle = PVFS_HANDLE_NULL;177 PVFS_handle_clear(msg_p->handle); 178 178 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 179 179 msg_p->comp_fn = event_mon_list_comp_fn; -
branches/orange-next/src/client/sysint/mgmt-get-dirdata-handle.sm
r7471 r8935 82 82 "PVFS_imgmt_get_dirdata_handle entered\n"); 83 83 84 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||84 if ((PVFS_handle_is_null(parent_ref.handle)) || 85 85 (parent_ref.fs_id == PVFS_FS_ID_NULL) || !out_dirdata_handle) 86 86 { … … 180 180 181 181 msg_p->fs_id = sm_p->parent_ref.fs_id; 182 msg_p->handle = sm_p->parent_ref.handle;182 PVFS_handle_copy(msg_p->handle, sm_p->parent_ref.handle); 183 183 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 184 184 msg_p->comp_fn = mgmt_get_dirdata_handle_comp_fn; … … 209 209 assert(sm_p->u.mgmt_get_dirdata_handle.dirdata_handle); 210 210 211 *sm_p->u.mgmt_get_dirdata_handle.dirdata_handle =212 resp_p->u.mgmt_get_dirdata_handle.handle ;211 PVFS_handle_copy(*sm_p->u.mgmt_get_dirdata_handle.dirdata_handle, 212 resp_p->u.mgmt_get_dirdata_handle.handle); 213 213 214 214 gossip_debug( -
branches/orange-next/src/client/sysint/mgmt-iterate-handles-list.sm
r8932 r8935 62 62 PVFS_handle **handle_matrix, 63 63 int *handle_count_array, 64 PVFS_ds_position *position_array, 64 PVFS_ds_position *ds_position_array, 65 PVFS_kv_position *kv_position_array, 66 unsigned int *position_flag_array, 65 67 PVFS_BMI_addr_t *addr_array, 66 68 int server_count, … … 78 80 "PVFS_imgmt_iterate_handles_list() entered.\n"); 79 81 80 if (server_count < 1 || !handle_matrix || !position_array 82 if (server_count < 1 || !handle_matrix || 83 !( ds_position_array || kv_position_array) 81 84 || !handle_count_array || !addr_array) 82 85 { … … 102 105 sm_p->u.iterate_handles_list.handle_matrix = handle_matrix; 103 106 sm_p->u.iterate_handles_list.handle_count_array = handle_count_array; 104 sm_p->u.iterate_handles_list.position_array = position_array; 107 sm_p->u.iterate_handles_list.ds_position_array = ds_position_array; 108 sm_p->u.iterate_handles_list.kv_position_array = kv_position_array; 109 sm_p->u.iterate_handles_list.position_flag_array = position_flag_array; 105 110 sm_p->u.iterate_handles_list.details = details; 106 111 PVFS_hint_copy(hints, &sm_p->hints); … … 125 130 PVFS_handle **handle_matrix, 126 131 int *handle_count_array, 127 PVFS_ds_position *position_array, 132 PVFS_ds_position *ds_position_array, 133 PVFS_kv_position *kv_position_array, 134 unsigned int *position_flag_array, 128 135 PVFS_BMI_addr_t *addr_array, 129 136 int server_count, … … 140 147 ret = PVFS_imgmt_iterate_handles_list( 141 148 fs_id, credentials, handle_matrix, handle_count_array, 142 position_array, addr_array, server_count, flags, details, hints, &op_id, NULL); 149 ds_position_array, kv_position_array, position_flag_array, 150 addr_array, server_count, flags, details, hints, &op_id, NULL); 143 151 144 152 if (ret) … … 182 190 /* TODO: use a better #define or something for ITERATE_END */ 183 191 /* FIX: position stuff changed to use small int and flag */ 184 if(sm_p->u.iterate_handles_list.position_ array[j]192 if(sm_p->u.iterate_handles_list.position_flag_array[j] 185 193 == PVFS_ITERATE_END) 186 194 { … … 192 200 else 193 201 { 202 /* FIX: need to handle is ds or kv_position_array is null */ 194 203 PINT_SERVREQ_MGMT_ITERATE_HANDLES_FILL( 195 204 msg_p->req, … … 197 206 sm_p->u.iterate_handles_list.fs_id, 198 207 sm_p->u.iterate_handles_list.handle_count_array[j], 199 sm_p->u.iterate_handles_list.position_array[j], 208 sm_p->u.iterate_handles_list.ds_position_array[j], 209 sm_p->u.iterate_handles_list.kv_position_array[j], 210 sm_p->u.iterate_handles_list.position_flag_array[j], 200 211 sm_p->u.iterate_handles_list.flags, 201 212 sm_p->hints); 202 213 msg_p->fs_id = sm_p->u.iterate_handles_list.fs_id; 203 msg_p->handle = PVFS_HANDLE_NULL;214 PVFS_handle_clear(msg_p->handle); 204 215 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 205 216 msg_p->comp_fn = iterate_handles_list_comp_fn; … … 287 298 sm_p->u.iterate_handles_list.handle_count_array[j] = 288 299 resp_p->u.mgmt_iterate_handles.handle_count; 289 sm_p->u.iterate_handles_list.position_array[j] = 290 resp_p->u.mgmt_iterate_handles.position; 300 memcpy(&(sm_p->u.iterate_handles_list.kv_position_array[j]), 301 &(resp_p->u.mgmt_iterate_handles.kv_position), 302 sizeof(PVFS_kv_position)); 303 PVFS_handle_copy(sm_p->u.iterate_handles_list.ds_position_array[j], 304 resp_p->u.mgmt_iterate_handles.ds_position); 305 sm_p->u.iterate_handles_list.position_flag_array[j] = 306 resp_p->u.mgmt_iterate_handles.position_flag; 291 307 memcpy(sm_p->u.iterate_handles_list.handle_matrix[j], 292 308 resp_p->u.mgmt_iterate_handles.handle_array, -
branches/orange-next/src/client/sysint/mgmt-perf-mon-list.sm
r8891 r8935 192 192 193 193 msg_p->fs_id = sm_p->u.perf_mon_list.fs_id; 194 msg_p->handle = PVFS_HANDLE_NULL;194 PVFS_handle_clear(msg_p->handle); 195 195 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 196 196 msg_p->comp_fn = perf_mon_list_comp_fn; -
branches/orange-next/src/client/sysint/mgmt-remove-dirent.sm
r7471 r8935 80 80 "PVFS_imgmt_remove_dirent entered\n"); 81 81 82 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||82 if ((PVFS_handle_is_null(parent_ref.handle)) || 83 83 (parent_ref.fs_id == PVFS_FS_ID_NULL)) 84 84 { … … 184 184 185 185 msg_p->fs_id = sm_p->parent_ref.fs_id; 186 msg_p->handle = sm_p->parent_ref.handle;186 PVFS_handle_copy(msg_p->handle, sm_p->parent_ref.handle); 187 187 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 188 188 msg_p->comp_fn = mgmt_remove_dirent_comp_fn; -
branches/orange-next/src/client/sysint/mgmt-remove-object.sm
r7471 r8935 79 79 "PVFS_imgmt_remove_object entered\n"); 80 80 81 if (( object_ref.handle == PVFS_HANDLE_NULL) ||81 if ((PVFS_handle_is_null(object_ref.handle)) || 82 82 (object_ref.fs_id == PVFS_FS_ID_NULL)) 83 83 { … … 180 180 181 181 msg_p->fs_id = sm_p->object_ref.fs_id; 182 msg_p->handle = sm_p->object_ref.handle;182 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 183 183 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 184 184 msg_p->comp_fn = mgmt_remove_object_comp_fn; -
branches/orange-next/src/client/sysint/mgmt-statfs-list.sm
r7471 r8935 195 195 196 196 msg_p->fs_id = sm_p->u.statfs_list.fs_id; 197 msg_p->handle = PVFS_HANDLE_NULL;197 PVFS_handle_clear(msg_p->handle); 198 198 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 199 199 msg_p->comp_fn = statfs_list_comp_fn; -
branches/orange-next/src/client/sysint/ncache.c
r5687 r8935 240 240 241 241 entry_key.entry_name = entry; 242 entry_key.parent_ref.handle = parent_ref->handle;242 PVFS_handle_copy(entry_key.parent_ref.handle, parent_ref->handle); 243 243 entry_key.parent_ref.fs_id = parent_ref->fs_id; 244 244 … … 305 305 306 306 entry_key.entry_name = entry; 307 entry_key.parent_ref.handle = parent_ref->handle;307 PVFS_handle_copy(entry_key.parent_ref.handle, parent_ref->handle); 308 308 entry_key.parent_ref.fs_id = parent_ref->fs_id; 309 309 … … 371 371 } 372 372 373 tmp_payload->parent_ref.handle = parent_ref->handle;373 PVFS_handle_copy(tmp_payload->parent_ref.handle, parent_ref->handle); 374 374 tmp_payload->parent_ref.fs_id = parent_ref->fs_id; 375 tmp_payload->entry_ref.handle = entry_ref->handle;375 PVFS_handle_copy(tmp_payload->entry_ref.handle, entry_ref->handle); 376 376 tmp_payload->entry_ref.fs_id = entry_ref->fs_id; 377 377 … … 388 388 389 389 entry_key.entry_name = entry; 390 entry_key.parent_ref.handle = parent_ref->handle;390 PVFS_handle_copy(entry_key.parent_ref.handle, parent_ref->handle); 391 391 entry_key.parent_ref.fs_id = parent_ref->fs_id; 392 392 … … 500 500 struct ncache_key* real_key = (struct ncache_key*) key; 501 501 int tmp_ret = 0; 502 unsigned int sum = 0, i = 0 ;502 unsigned int sum = 0, i = 0, h_hash = 0; 503 503 504 504 while(real_key->entry_name[i] != '\0') … … 507 507 i++; 508 508 } 509 sum += real_key->parent_ref.handle + real_key->parent_ref.fs_id; 509 510 PVFS_handle_to_hash(real_key->parent_ref.handle, &h_hash); 511 sum += h_hash + real_key->parent_ref.fs_id; 510 512 tmp_ret = sum % table_size; 511 513 return(tmp_ret); -
branches/orange-next/src/client/sysint/pint-sysint-utils.c
r7471 r8935 62 62 } 63 63 gossip_err("cannot get parent directory of %s\n", filename); 64 *handle = PVFS_HANDLE_NULL;64 PVFS_handle_clear(*handle); 65 65 return ret; 66 66 } … … 71 71 { 72 72 gossip_err("Lookup failed on %s\n", buf); 73 *handle = PVFS_HANDLE_NULL;73 PVFS_handle_clear(*handle); 74 74 return ret; 75 75 } 76 76 77 *handle = resp_look.ref.handle;77 PVFS_handle_copy(*handle, resp_look.ref.handle); 78 78 return 0; 79 79 } -
branches/orange-next/src/client/sysint/remove.sm
r8098 r8935 201 201 202 202 msg_p->fs_id = sm_p->object_ref.fs_id; 203 msg_p->handle = attr->u.meta.dfile_array[0];203 PVFS_handle_copy(msg_p->handle, attr->u.meta.dfile_array[0]); 204 204 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; /* TODO: Do we want retry? */ 205 205 msg_p->comp_fn = NULL; … … 241 241 242 242 msg_p->fs_id = sm_p->object_ref.fs_id; 243 msg_p->handle = sm_p->object_ref.handle;243 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 244 244 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 245 245 msg_p->comp_fn = NULL; -
branches/orange-next/src/client/sysint/server-get-config.sm
r8317 r8935 243 243 244 244 msg_p->fs_id = PVFS_FS_ID_NULL; 245 msg_p->handle = PVFS_HANDLE_NULL;245 PVFS_handle_clear(msg_p->handle); 246 246 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 247 247 msg_p->comp_fn = server_get_config_comp_fn; -
branches/orange-next/src/client/sysint/sys-create.sm
r8891 r8935 148 148 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_create entered\n"); 149 149 150 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||150 if ((PVFS_handle_is_null(parent_ref.handle)) || 151 151 (parent_ref.fs_id == PVFS_FS_ID_NULL) || 152 152 (object_name == NULL) || (resp == NULL)) … … 362 362 PINT_smcb *smcb = v_p; 363 363 PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); 364 int i = 0; 364 365 365 366 gossip_debug(GOSSIP_CLIENT_DEBUG, "create_create_comp_fn\n"); … … 373 374 374 375 /* otherwise, just stash the newly created meta handle */ 375 sm_p->u.create.metafile_handle =376 resp_p->u.create.metafile_handle ;376 PVFS_handle_copy(sm_p->u.create.metafile_handle, 377 resp_p->u.create.metafile_handle); 377 378 sm_p->u.create.datafile_count = resp_p->u.create.datafile_count; 378 379 sm_p->u.create.datafile_handles = malloc( … … 383 384 return -PVFS_ENOMEM; 384 385 } 385 memcpy(sm_p->u.create.datafile_handles, 386 resp_p->u.create.datafile_handles, 387 (sizeof(*sm_p->u.create.datafile_handles) * 388 resp_p->u.create.datafile_count)); 386 387 for( i=0; i < resp_p->u.create.datafile_count; i++ ) 388 { 389 PVFS_handle_copy(sm_p->u.create.datafile_handles[i], 390 resp_p->u.create.datafile_handles[i]); 391 } 389 392 sm_p->u.create.stuffed = resp_p->u.create.stuffed; 390 393 … … 464 467 465 468 msg_p->fs_id = sm_p->object_ref.fs_id; 466 msg_p->handle = meta_handle_extent_array.extent_array[0].first; 469 PVFS_handle_copy(msg_p->handle, 470 meta_handle_extent_array.extent_array[0].first); 467 471 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 468 472 msg_p->comp_fn = create_comp_fn; … … 509 513 510 514 msg_p->fs_id = sm_p->object_ref.fs_id; 511 msg_p->handle = sm_p->object_ref.handle;515 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 512 516 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 513 517 msg_p->comp_fn = create_crdirent_comp_fn; … … 565 569 if (sm_p->error_code == 0) 566 570 { 567 metafile_ref.handle = sm_p->u.create.metafile_handle;571 PVFS_handle_copy(metafile_ref.handle, sm_p->u.create.metafile_handle); 568 572 metafile_ref.fs_id = sm_p->object_ref.fs_id; 569 573 … … 596 600 { 597 601 sm_p->u.create.attr.u.meta.dist = sm_p->u.create.dist; 598 sm_p->u.create.attr.u.meta.dist_size = PINT_DIST_PACK_SIZE(sm_p->u.create.dist); 602 sm_p->u.create.attr.u.meta.dist_size = 603 PINT_DIST_PACK_SIZE(sm_p->u.create.dist); 599 604 sm_p->u.create.attr.mask |= PVFS_ATTR_META_DIST; 600 605 } … … 994 999 995 1000 msg_p->fs_id = sm_p->object_ref.fs_id; 996 msg_p->handle = sm_p->u.create.metafile_handle;1001 PVFS_handle_copy(msg_p->handle, sm_p->u.create.metafile_handle); 997 1002 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 998 1003 msg_p->comp_fn = create_delete_handles_comp_fn; … … 1011 1016 1012 1017 msg_p->fs_id = sm_p->object_ref.fs_id; 1013 msg_p->handle = sm_p->u.create.datafile_handles[i];1018 PVFS_handle_copy(msg_p->handle, sm_p->u.create.datafile_handles[i]); 1014 1019 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 1015 1020 msg_p->comp_fn = create_delete_handles_comp_fn; -
branches/orange-next/src/client/sysint/sys-del-eattr.sm
r7471 r8935 65 65 gossip_debug(GOSSIP_CLIENT_DEBUG, "PINT_isys_del_eattr entered\n"); 66 66 67 if (( ref.handle == PVFS_HANDLE_NULL) ||67 if ((PVFS_handle_is_null(ref.handle)) || 68 68 (ref.fs_id == PVFS_FS_ID_NULL)) 69 69 { … … 150 150 151 151 msg_p->fs_id = sm_p->object_ref.fs_id; 152 msg_p->handle = sm_p->object_ref.handle;152 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 153 153 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 154 154 msg_p->comp_fn = del_eattr_comp_fn; -
branches/orange-next/src/client/sysint/sys-flush.sm
r7471 r8935 82 82 83 83 if ((ref.fs_id == PVFS_FS_ID_NULL) || 84 ( ref.handle == PVFS_HANDLE_NULL))84 (PVFS_handle_is_null(ref.handle))) 85 85 { 86 86 gossip_err("Invalid handle/fs_id specified\n"); … … 197 197 198 198 msg_p->fs_id = sm_p->object_ref.fs_id; 199 msg_p->handle = attr->u.meta.dfile_array[i];199 PVFS_handle_copy(msg_p->handle, attr->u.meta.dfile_array[i]); 200 200 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 201 201 msg_p->comp_fn = NULL; … … 216 216 217 217 msg_p->fs_id = sm_p->object_ref.fs_id; 218 msg_p->handle = sm_p->object_ref.handle;218 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 219 219 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 220 220 msg_p->comp_fn = NULL; -
branches/orange-next/src/client/sysint/sys-get-eattr.sm
r8891 r8935 73 73 "PINT_isys_geteattr entered\n"); 74 74 75 if (( ref.handle == PVFS_HANDLE_NULL) ||75 if ((PVFS_handle_is_null(ref.handle)) || 76 76 (ref.fs_id == PVFS_FS_ID_NULL) || (resp_p == NULL)) 77 77 { … … 189 189 190 190 msg_p->fs_id = sm_p->object_ref.fs_id; 191 msg_p->handle = sm_p->object_ref.handle;191 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 192 192 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 193 193 msg_p->comp_fn = get_eattr_comp_fn; -
branches/orange-next/src/client/sysint/sys-getattr.sm
r8451 r8935 176 176 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_getattr entered\n"); 177 177 178 if ( (ref.handle == PVFS_HANDLE_NULL) ||178 if (PVFS_handle_is_null(ref.handle) || 179 179 (ref.fs_id == PVFS_FS_ID_NULL) || (resp_p == NULL)) 180 180 { … … 312 312 object_ref = sm_p->getattr.object_ref; 313 313 314 assert( object_ref.handle != PVFS_HANDLE_NULL);314 assert(!PVFS_handle_is_null(object_ref.handle)); 315 315 assert(object_ref.fs_id != PVFS_FS_ID_NULL); 316 316 … … 491 491 492 492 assert(object_ref.fs_id != PVFS_FS_ID_NULL); 493 assert( object_ref.handle != PVFS_HANDLE_NULL);493 assert(!PVFS_handle_is_null(object_ref.handle)); 494 494 495 495 /* setup the msgpair to do a getattr operation */ … … 503 503 504 504 msg_p->fs_id = object_ref.fs_id; 505 msg_p->handle = object_ref.handle;505 PVFS_handle_copy(msg_p->handle, object_ref.handle); 506 506 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 507 507 msg_p->comp_fn = getattr_object_getattr_comp_fn; … … 753 753 for (i=0; i<getattr->mir_ctx_count; i++) 754 754 { 755 getattr->mir_ctx_array[i].original_datahandle = attr->u.meta.dfile_array[i]; 755 PVFS_handle_copy(getattr->mir_ctx_array[i].original_datahandle, 756 attr->u.meta.dfile_array[i]); 756 757 getattr->mir_ctx_array[i].original_server_nr = i; 757 758 } … … 795 796 796 797 msg_p->fs_id = sm_p->getattr.object_ref.fs_id; 797 msg_p->handle = handles[0];798 PVFS_handle_copy(msg_p->handle, handles[0]); 798 799 msg_p->comp_fn = getattr_datafile_getattr_comp_fn; 799 800 … … 1029 1030 { 1030 1031 ctx->retry_original = 0; 1031 tmp_handles[j] = ctx->original_datahandle;1032 PVFS_handle_copy(tmp_handles[j], ctx->original_datahandle); 1032 1033 tmp_server_nr[j] = ctx->original_server_nr; 1033 1034 j++; … … 1046 1047 if (meta->mirror_dfile_array[index] != 0) 1047 1048 { /* we have found a valid mirrored handle */ 1048 tmp_handles[j] = meta->mirror_dfile_array[index]; 1049 PVFS_handle_copy(tmp_handles[j], 1050 meta->mirror_dfile_array[index]); 1049 1051 tmp_server_nr[j] = server_nr; 1050 1052 j++; … … 1058 1060 if ( copies == meta->mirror_copies_count ) 1059 1061 { 1060 tmp_handles[j] = ctx->original_datahandle;1062 PVFS_handle_copy(tmp_handles[j], ctx->original_datahandle); 1061 1063 tmp_server_nr[j] = ctx->original_server_nr; 1062 1064 j++; … … 1083 1085 1084 1086 /*replace values in old message request*/ 1085 msg->handle = tmp_handles[0];1087 PVFS_handle_copy(msg->handle, tmp_handles[0]); 1086 1088 msg->svr_addr=0; 1087 1089 ret = PINT_cached_config_map_to_server(&msg->svr_addr -
branches/orange-next/src/client/sysint/sys-io.sm
r8416 r8935 302 302 llu(ref.handle)); 303 303 304 if (( ref.handle == PVFS_HANDLE_NULL) ||304 if ((PVFS_handle_is_null(ref.handle)) || 305 305 (ref.fs_id == PVFS_FS_ID_NULL) || (resp_p == NULL)) 306 306 { … … 524 524 525 525 msg_p->fs_id = sm_p->object_ref.fs_id; 526 msg_p->handle = sm_p->object_ref.handle;526 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 527 527 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 528 528 msg_p->comp_fn = unstuff_comp_fn; … … 1066 1066 { 1067 1067 /* setup context to retry the original */ 1068 ctx->data_handle = meta->dfile_array[ctx->server_nr]; 1068 PVFS_handle_copy(ctx->data_handle, 1069 meta->dfile_array[ctx->server_nr]); 1069 1070 ctx->retry_original = 0; 1070 msg->handle = ctx->data_handle; 1071 msg->req.u.io.handle = ctx->data_handle; 1071 PVFS_handle_copy(msg->handle, ctx->data_handle); 1072 PVFS_handle_copy(msg->req.u.io.handle, ctx->data_handle); 1073 ret = PINT_cached_config_map_to_server(&(msg->svr_addr), 1074 msg->handle, msg->fs_id); 1075 if (ret) 1076 { 1077 gossip_lerr("Unable to determine the server address " 1078 "for this handle (%llu)", 1079 llu(msg->handle)); 1080 js_p->error_code = ret; 1081 return SM_ACTION_COMPLETE; 1082 } 1083 PINT_flow_reset(&(ctx->flow_desc)); 1084 continue; 1085 } 1086 1087 /* get next mirrored handle. note: if a mirrored handle is zero, then 1088 * this means that the creation of this mirrored object failed for its 1089 * particular server. if so, then get the next valid handle. as a 1090 * last resort, retry the original handle. 1091 */ 1092 copies = ctx->current_copies_count; 1093 for (;copies < meta->mirror_copies_count; copies++) 1094 { 1095 index = (copies*meta->dfile_count) + ctx->server_nr; 1096 if (meta->mirror_dfile_array[index] != 0) 1097 { /* we have found a valid mirrored handle */ 1098 PVFS_handle_copy(ctx->data_handle, 1099 meta->mirror_dfile_array[index]); 1100 break; 1101 } 1102 } 1103 1104 /* we have NOT found a valid mirrored handle, so retry the primary */ 1105 if ( copies == meta->mirror_copies_count ) 1106 { 1107 PVFS_handle_copy(ctx->data_handle, 1108 meta->dfile_array[ctx->server_nr]); 1109 ctx->retry_original = 0; 1110 ctx->current_copies_count = 0; 1111 io->retry_count++; 1112 /* setup context to retry original */ 1113 PVFS_handle_copy(msg->handle, ctx->data_handle); 1114 PVFS_handle_copy(msg->req.u.io.handle, ctx->data_handle); 1072 1115 ret=PINT_cached_config_map_to_server(&(msg->svr_addr) 1073 1116 ,msg->handle … … 1085 1128 } 1086 1129 1087 /* get next mirrored handle. note: if a mirrored handle is zero, then1088 * this means that the creation of this mirrored object failed for its1089 * particular server. if so, then get the next valid handle. as a1090 * last resort, retry the original handle.1091 */1092 copies = ctx->current_copies_count;1093 for (;copies < meta->mirror_copies_count; copies++)1094 {1095 index = (copies*meta->dfile_count) + ctx->server_nr;1096 if (meta->mirror_dfile_array[index] != 0)1097 { /* we have found a valid mirrored handle */1098 ctx->data_handle = meta->mirror_dfile_array[index];1099 break;1100 }1101 }1102 1103 /* we have NOT found a valid mirrored handle, so retry the primary */1104 if ( copies == meta->mirror_copies_count )1105 {1106 ctx->data_handle = meta->dfile_array[ctx->server_nr];1107 ctx->retry_original = 0;1108 ctx->current_copies_count = 0;1109 io->retry_count++;1110 /* setup context to retry original */1111 msg->handle = ctx->data_handle;1112 msg->req.u.io.handle = ctx->data_handle;1113 ret=PINT_cached_config_map_to_server(&(msg->svr_addr)1114 ,msg->handle1115 ,msg->fs_id);1116 if (ret)1117 {1118 gossip_lerr("Unable to determine the server address "1119 "for this handle (%llu)"1120 ,llu(msg->handle));1121 js_p->error_code = ret;1122 return SM_ACTION_COMPLETE;1123 }1124 PINT_flow_reset(&(ctx->flow_desc));1125 continue;1126 }1127 1128 1130 /* setup the context for the discovered mirrored handle */ 1129 msg->handle = ctx->data_handle;1130 msg->req.u.io.handle = ctx->data_handle;1131 ret =PINT_cached_config_map_to_server(&(msg->svr_addr)1132 ,msg->handle1133 ,msg->fs_id);1131 PVFS_handle_copy(msg->handle, ctx->data_handle); 1132 PVFS_handle_copy(msg->req.u.io.handle, ctx->data_handle); 1133 ret = PINT_cached_config_map_to_server(&(msg->svr_addr), 1134 msg->handle, 1135 msg->fs_id); 1134 1136 if (ret) 1135 1137 { … … 3084 3086 3085 3087 msg->fs_id = sm_p->object_ref.fs_id; 3086 msg->handle = 3087 attr->u.meta.dfile_array[ 3088 sm_p->u.io.datafile_index_array[i]]; 3088 PVFS_handle_copy(msg->handle, 3089 attr->u.meta.dfile_array[sm_p->u.io.datafile_index_array[i]]); 3089 3090 msg->retry_flag = PVFS_MSGPAIR_NO_RETRY; 3090 3091 msg->comp_fn = NULL; … … 3104 3105 cur_ctx->index = i; 3105 3106 cur_ctx->server_nr = sm_p->u.io.datafile_index_array[i]; 3106 cur_ctx->data_handle =3107 attr->u.meta.dfile_array[cur_ctx->server_nr] ;3107 PVFS_handle_copy(cur_ctx->data_handle, 3108 attr->u.meta.dfile_array[cur_ctx->server_nr]); 3108 3109 3109 3110 PINT_flow_reset(&cur_ctx->flow_desc); -
branches/orange-next/src/client/sysint/sys-list-eattr.sm
r8932 r8935 53 53 PVFS_error PVFS_isys_listeattr( 54 54 PVFS_object_ref ref, 55 PVFS_ds_position token, 55 PVFS_kv_position token, 56 uint32_t token_flag, 56 57 int32_t nkey, 57 58 const PVFS_credentials *credentials, … … 69 70 "PINT_isys_listeattr entered\n"); 70 71 71 if (( ref.handle == PVFS_HANDLE_NULL) ||72 if ((PVFS_handle_is_null(ref.handle)) || 72 73 (ref.fs_id == PVFS_FS_ID_NULL) || (resp_p == NULL)) 73 74 { … … 114 115 sm_p->u.listeattr.nkey = nkey; 115 116 sm_p->u.listeattr.resp_p = resp_p; 116 sm_p->u.listeattr.pos_token = token; 117 memcpy(&(sm_p->u.listeattr.pos_token), &token, sizeof(PVFS_kv_position)); 118 sm_p->u.listeattr.pos_token_flag = token_flag; 117 119 sm_p->error_code = 0; 118 120 sm_p->object_ref = ref; … … 125 127 PVFS_error PVFS_sys_listeattr( 126 128 PVFS_object_ref ref, 127 PVFS_ds_position token, 129 PVFS_kv_position token, 130 uint32_t token_flag, 128 131 int32_t nkey, 129 132 const PVFS_credentials *credentials, … … 136 139 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_listeattr entered\n"); 137 140 138 ret = PVFS_isys_listeattr(ref, token, nkey, credentials,141 ret = PVFS_isys_listeattr(ref, token, token_flag, nkey, credentials, 139 142 resp_p, &op_id, hints, NULL); 140 143 … … 187 190 sm_p->object_ref.handle, 188 191 sm_p->u.listeattr.pos_token, 192 sm_p->u.listeattr.pos_token_flag, 189 193 sm_p->u.listeattr.nkey, 190 194 sm_p->u.listeattr.size_array, … … 193 197 194 198 msg_p->fs_id = sm_p->object_ref.fs_id; 195 msg_p->handle = sm_p->object_ref.handle;199 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 196 200 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 197 201 msg_p->comp_fn = list_eattr_comp_fn; … … 249 253 return sm_p->msgarray_op.msgarray[i].op_status; 250 254 } 251 sm_p->u.listeattr.resp_p->token = resp_p->u.listeattr.token; 255 memcpy(&(sm_p->u.listeattr.resp_p->token), &(resp_p->u.listeattr.token), 256 sizeof(PVFS_kv_position)); 252 257 sm_p->u.listeattr.resp_p->nkey = resp_p->u.listeattr.nkey; 253 258 … … 261 266 else 262 267 { 263 gossip_debug(GOSSIP_LISTEATTR_DEBUG,"listeattr returned % dkeys\n",264 sm_p->u.listeattr.resp_p-> nkey);268 gossip_debug(GOSSIP_LISTEATTR_DEBUG,"listeattr returned %llu keys\n", 269 sm_p->u.listeattr.resp_p->token.count); 265 270 /* Copy the token and reset it */ 266 sm_p->u.listeattr.resp_p->nkey = sm_p->u.listeattr.resp_p->token; 267 /* FIX: position stuff changed to use small int and flag */ 268 sm_p->u.listeattr.resp_p->token = PVFS_ITERATE_START; 271 sm_p->u.listeattr.resp_p->token_flag = PVFS_ITERATE_START; 269 272 return 0; 270 273 } 271 if (sm_p->u.listeattr.resp_p->nkey > 0) 274 275 if (sm_p->u.listeattr.resp_p->token.count > 0) 272 276 { 273 277 int k; … … 277 281 return -1; 278 282 } 279 for (k = 0; k < sm_p->u.listeattr.resp_p-> nkey; k++)283 for (k = 0; k < sm_p->u.listeattr.resp_p->token.count; k++) 280 284 { 281 285 gossip_debug(GOSSIP_LISTEATTR_DEBUG,"resp_read_sz = %d\n", -
branches/orange-next/src/client/sysint/sys-lookup.sm
r8706 r8935 568 568 if (name && resp) 569 569 { 570 parent.handle = 0;570 PVFS_handle_clear(parent.handle); 571 571 parent.fs_id = fs_id; 572 572 … … 582 582 if (strcmp(name, "/") == 0) 583 583 { 584 resp->ref.handle = parent.handle;584 PVFS_handle_copy(resp->ref.handle, parent.handle); 585 585 resp->ref.fs_id = fs_id; 586 586 ret = 0; … … 629 629 630 630 parent_ref.fs_id = cur_seg->seg_starting_refn.fs_id; 631 parent_ref.handle = cur_seg->seg_starting_refn.handle;631 PVFS_handle_copy(parent_ref.handle, cur_seg->seg_starting_refn.handle); 632 632 633 633 ret = PINT_ncache_get_cached_entry(cur_seg->seg_name, &object_ref, … … 640 640 object_ref.fs_id); 641 641 642 cur_seg->seg_resolved_refn.handle = object_ref.handle;642 PVFS_handle_copy(cur_seg->seg_resolved_refn.handle, object_ref.handle); 643 643 cur_seg->seg_resolved_refn.fs_id = object_ref.fs_id; 644 644 js_p->error_code = 0; /* hit */ … … 705 705 706 706 msg_p->fs_id = cur_seg->seg_starting_refn.fs_id; 707 msg_p->handle = cur_seg->seg_starting_refn.handle;707 PVFS_handle_copy(msg_p->handle, cur_seg->seg_starting_refn.handle); 708 708 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 709 709 msg_p->comp_fn = lookup_segment_lookup_comp_fn; … … 1163 1163 } 1164 1164 1165 last_resolved_refn.handle = resp_p->u.lookup_path.handle_array[i]; 1165 PVFS_handle_copy(last_resolved_refn.handle, 1166 resp_p->u.lookup_path.handle_array[i]); 1166 1167 last_resolved_refn.fs_id = cur_seg->seg_starting_refn.fs_id; 1167 1168 -
branches/orange-next/src/client/sysint/sys-mkdir.sm
r7499 r8935 169 169 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_mkdir entered\n"); 170 170 171 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||171 if ((PVFS_handle_is_null(parent_ref.handle)) || 172 172 (parent_ref.fs_id == PVFS_FS_ID_NULL) || 173 173 (object_name == NULL) || (resp == NULL)) … … 305 305 306 306 /* otherwise, just stash the newly created meta handle */ 307 sm_p->u.mkdir.metafile_handle = resp_p->u.mkdir.handle;307 PVFS_handle_copy(sm_p->u.mkdir.metafile_handle, resp_p->u.mkdir.handle); 308 308 309 309 /* also insert entry into attr cache */ … … 376 376 377 377 msg_p->fs_id = sm_p->object_ref.fs_id; 378 msg_p->handle = meta_handle_extent_array.extent_array[0].first; 378 PVFS_handle_copy(msg_p->handle, 379 meta_handle_extent_array.extent_array[0].first); 379 380 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 380 381 msg_p->comp_fn = mkdir_msg_comp_fn; … … 426 427 427 428 msg_p->fs_id = sm_p->object_ref.fs_id; 428 msg_p->handle = sm_p->object_ref.handle;429 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 429 430 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 430 431 msg_p->comp_fn = mkdir_crdirent_comp_fn; … … 491 492 492 493 msg_p->fs_id = sm_p->object_ref.fs_id; 493 msg_p->handle = sm_p->u.mkdir.metafile_handle;494 PVFS_handle_copy(msg_p->handle, sm_p->u.mkdir.metafile_handle); 494 495 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 495 496 msg_p->comp_fn = mkdir_delete_handle_comp_fn; … … 535 536 PVFS_object_ref directory_ref; 536 537 537 directory_ref.handle = sm_p->u.mkdir.metafile_handle;538 PVFS_handle_copy(directory_ref.handle, sm_p->u.mkdir.metafile_handle); 538 539 directory_ref.fs_id = sm_p->object_ref.fs_id; 539 540 540 sm_p->u.mkdir.mkdir_resp->ref.handle = directory_ref.handle; 541 PVFS_handle_copy(sm_p->u.mkdir.mkdir_resp->ref.handle, 542 directory_ref.handle); 541 543 sm_p->u.mkdir.mkdir_resp->ref.fs_id = directory_ref.fs_id; 542 544 … … 713 715 714 716 msg_p->fs_id = sm_p->object_ref.fs_id; 715 msg_p->handle = sm_p->u.mkdir.metafile_handle;717 PVFS_handle_copy(msg_p->handle, sm_p->u.mkdir.metafile_handle); 716 718 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 717 719 /* NOTE: no comp_fn needed. */ -
branches/orange-next/src/client/sysint/sys-readdir.sm
r8933 r8935 99 99 PVFS_object_ref ref, 100 100 PVFS_kv_position token, 101 uint32_t token_flag,101 uint32_t *token_flag_p, 102 102 int32_t pvfs_dirent_incount, 103 103 const PVFS_credentials *credentials, … … 107 107 void *user_ptr) 108 108 { 109 /* FIX: use token_flag */ 109 110 PVFS_error ret = -PVFS_EINVAL; 110 111 PINT_smcb *smcb = NULL; … … 113 114 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_readdir entered\n"); 114 115 115 if (( ref.handle == PVFS_HANDLE_NULL) ||116 if ((PVFS_handle_is_null(ref.handle)) || 116 117 (ref.fs_id == PVFS_FS_ID_NULL) || 117 118 (resp == NULL)) … … 151 152 sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; 152 153 sm_p->readdir.token = &resp->token; 153 sm_p->readdir.token_flag = &resp->token;154 sm_p->readdir.token_flag = token_flag_p; 154 155 sm_p->readdir.directory_version = &resp->directory_version; 155 156 156 sm_p->readdir.pos_token = sm_p->u.readdir.pos_token = token; 157 memcpy(&(sm_p->readdir.pos_token), &token, sizeof(PVFS_kv_position)); 158 memcpy(&(sm_p->u.readdir.pos_token), &token, sizeof(PVFS_kv_position)); 159 sm_p->readdir.pos_token_flag = *token_flag_p; 157 160 sm_p->readdir.dirent_limit = sm_p->u.readdir.dirent_limit = pvfs_dirent_incount; 158 161 … … 174 177 PVFS_object_ref ref, 175 178 PVFS_kv_position token, 176 uint32_t token_flag,179 uint32_t *token_flag_p, 177 180 int32_t pvfs_dirent_incount, 178 181 const PVFS_credentials *credentials, … … 185 188 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_readdir entered\n"); 186 189 187 ret = PVFS_isys_readdir(ref, token, token_flag , pvfs_dirent_incount,190 ret = PVFS_isys_readdir(ref, token, token_flag_p, pvfs_dirent_incount, 188 191 credentials, resp, &op_id, hints, NULL); 189 192 if (ret) … … 245 248 246 249 gossip_debug( 247 GOSSIP_READDIR_DEBUG, "%llu|%d | token is %llu | limit is %d\n", 250 GOSSIP_READDIR_DEBUG, "%llu|%d | token is session(%llu), count(%llu) |" 251 "limit is %d\n", 248 252 llu(sm_p->object_ref.handle), 249 253 sm_p->object_ref.fs_id, 250 llu(sm_p->readdir.pos_token), 254 llu(sm_p->readdir.pos_token.session), 255 llu(sm_p->readdir.pos_token.count), 251 256 sm_p->readdir.dirent_limit); 252 257 … … 265 270 266 271 msg_p->fs_id = sm_p->object_ref.fs_id; 267 msg_p->handle = sm_p->object_ref.handle;272 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 268 273 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 269 274 msg_p->comp_fn = readdir_msg_comp_fn; … … 307 312 *(sm_p->readdir.dirent_outcount) = 308 313 resp_p->u.readdir.dirent_count; 309 *(sm_p->readdir.token_flag (= resp_p->u.readdir.token_flag;314 *(sm_p->readdir.token_flag) = resp_p->u.readdir.token_flag; 310 315 311 316 if (*(sm_p->readdir.dirent_outcount) > 0) … … 353 358 for(i = 0; i < *(sm_p->readdir.dirent_outcount); i++) 354 359 { 355 tmp_ref.handle = (*(sm_p->readdir.dirent_array))[i].handle; 360 PVFS_handle_copy(tmp_ref.handle, 361 (*(sm_p->readdir.dirent_array))[i].handle); 356 362 PINT_ncache_update( 357 363 (const char *) (*(sm_p->readdir.dirent_array))[i].d_name, -
branches/orange-next/src/client/sysint/sys-readdirplus.sm
r8869 r8935 109 109 PVFS_error PVFS_isys_readdirplus( 110 110 PVFS_object_ref ref, 111 PVFS_ds_position token, 111 PVFS_kv_position token, 112 uint32_t *token_flag_p, 112 113 int32_t pvfs_dirent_incount, 113 114 const PVFS_credentials *credentials, … … 124 125 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_readdirplus entered\n"); 125 126 126 if (( ref.handle == PVFS_HANDLE_NULL) ||127 if ((PVFS_handle_is_null(ref.handle)) || 127 128 (ref.fs_id == PVFS_FS_ID_NULL) || 128 129 (resp == NULL)) … … 150 151 sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); 151 152 153 /* FIX: this needs to be changed to be like readdir w.r.t token/token_flag 154 * usage */ 152 155 PINT_init_msgarray_params(sm_p, ref.fs_id); 153 156 PINT_init_sysint_credentials(sm_p->cred_p, credentials); 154 157 sm_p->object_ref = ref; 155 158 PVFS_hint_copy(hints, &sm_p->hints); 156 /* point the sm dirent array and outcount to the readdirplus response field */ 159 /* point the sm dirent array and outcount to the readdirplus response 160 * field */ 157 161 sm_p->readdir.dirent_array = &resp->dirent_array; 158 162 sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; … … 190 194 PVFS_error PVFS_sys_readdirplus( 191 195 PVFS_object_ref ref, 192 PVFS_ds_position token, 196 PVFS_kv_position token, 197 uint32_t *token_flag_p, 193 198 int32_t pvfs_dirent_incount, 194 199 const PVFS_credentials *credentials, … … 202 207 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_readdirplus entered\n"); 203 208 204 ret = PVFS_isys_readdirplus(ref, token, pvfs_dirent_incount,209 ret = PVFS_isys_readdirplus(ref, token, token_flag_p, pvfs_dirent_incount, 205 210 credentials, attrmask, resp, &op_id, NULL, hints); 206 211 if (ret) … … 381 386 break; 382 387 } 383 (*per_server_handles)[svr_index][(*per_server_handle_count)[svr_index] - 1] = input_handle_array[i].handle; 388 PVFS_handle_copy( (*per_server_handles)[svr_index][(*per_server_handle_count)[svr_index] - 1], 389 input_handle_array[i].handle); 384 390 } 385 391 if (i != input_handle_count) … … 456 462 for (i = 0; i < sm_p->u.readdirplus.nhandles; i++) 457 463 { 458 sm_p->u.readdirplus.input_handle_array[i].handle =459 readdirplus_resp->dirent_array[i].handle;464 PVFS_handle_copy(sm_p->u.readdirplus.input_handle_array[i].handle, 465 readdirplus_resp->dirent_array[i].handle); 460 466 sm_p->u.readdirplus.input_handle_array[i].handle_index = i; 461 467 /* aux index is not used for meta handles */ … … 525 531 sm_p->hints); 526 532 msg_p->fs_id = sm_p->object_ref.fs_id; 527 msg_p->handle = PVFS_HANDLE_NULL;533 PVFS_handle_clear(msg_p->handle); 528 534 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 529 535 msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; … … 677 683 for (j = 0; j < sm_p->u.readdirplus.obj_attr_array[i].u.meta.dfile_count; j++) 678 684 { 679 sm_p->u.readdirplus.input_handle_array[nhandles].handle = 680 sm_p->u.readdirplus.obj_attr_array[i].u.meta.dfile_array[j]; 681 sm_p->u.readdirplus.input_handle_array[nhandles].handle_index = i; 685 PVFS_handle_copy( 686 sm_p->u.readdirplus.input_handle_array[nhandles].handle, 687 sm_p->u.readdirplus.obj_attr_array[i].u.meta.dfile_array[j] 688 ); 689 sm_p->u.readdirplus.input_handle_array[nhandles].handle_index = 690 i; 682 691 sm_p->u.readdirplus.input_handle_array[nhandles].aux_index = j; 683 692 nhandles++; … … 746 755 sm_p->hints); 747 756 msg_p->fs_id = sm_p->object_ref.fs_id; 748 msg_p->handle = PVFS_HANDLE_NULL;757 PVFS_handle_clear(msg_p->handle); 749 758 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 750 759 msg_p->comp_fn = readdirplus_fetch_sizes_comp_fn; -
branches/orange-next/src/client/sysint/sys-remove.sm
r7471 r8935 164 164 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_remove entered\n"); 165 165 166 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||166 if ((PVFS_handle_is_null(parent_ref.handle)) || 167 167 (parent_ref.fs_id == PVFS_FS_ID_NULL) || 168 168 (object_name == NULL)) … … 283 283 284 284 msg_p->fs_id = sm_p->parent_ref.fs_id; 285 msg_p->handle = sm_p->parent_ref.handle;285 PVFS_handle_copy(msg_p->handle, sm_p->parent_ref.handle); 286 286 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 287 287 msg_p->comp_fn = remove_rmdirent_comp_fn; … … 334 334 335 335 msg_p->fs_id = sm_p->parent_ref.fs_id; 336 msg_p->handle = sm_p->parent_ref.handle;336 PVFS_handle_copy(msg_p->handle, sm_p->parent_ref.handle); 337 337 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 338 338 msg_p->comp_fn = remove_crdirent_comp_fn; … … 363 363 if (resp_p->status == 0) 364 364 { 365 assert( resp_p->u.rmdirent.entry_handle != PVFS_HANDLE_NULL);365 assert(!PVFS_handle_is_null(resp_p->u.rmdirent.entry_handle)); 366 366 assert(sm_p->parent_ref.fs_id != PVFS_FS_ID_NULL); 367 367 368 368 /* pull handle out of response, also copy in fs_id from before */ 369 sm_p->object_ref.handle = resp_p->u.rmdirent.entry_handle; 369 PVFS_handle_copy(sm_p->object_ref.handle, 370 resp_p->u.rmdirent.entry_handle); 370 371 sm_p->object_ref.fs_id = sm_p->parent_ref.fs_id; 371 372 -
branches/orange-next/src/client/sysint/sys-rename.sm
r8700 r8935 235 235 236 236 if ((old_entry == NULL) || (new_entry == NULL) || 237 ( old_parent_ref.handle == PVFS_HANDLE_NULL) ||237 (PVFS_handle_is_null(old_parent_ref.handle)) || 238 238 (old_parent_ref.fs_id == PVFS_FS_ID_NULL) || 239 ( new_parent_ref.handle == PVFS_HANDLE_NULL) ||239 (PVFS_handle_is_null(new_parent_ref.handle)) || 240 240 (new_parent_ref.fs_id == PVFS_FS_ID_NULL)) 241 241 { … … 245 245 246 246 /* don't even try to rename a file to itself */ 247 if (( old_parent_ref.handle == new_parent_ref.handle) &&248 (old_parent_ref.fs_id == new_parent_ref.fs_id) &&247 if ((PVFS_handle_compare(old_parent_ref.handle, new_parent_ref.handle)==0) 248 && (old_parent_ref.fs_id == new_parent_ref.fs_id) && 249 249 (strcmp(old_entry, new_entry) == 0)) 250 250 { … … 407 407 */ 408 408 assert(resp_p->u.lookup_path.handle_count == 1); 409 sm_p->u.rename.refns[index].handle =410 resp_p->u.lookup_path.handle_array[0];409 PVFS_handle_copy(sm_p->u.rename.refns[index].handle, 410 resp_p->u.lookup_path.handle_array[0]); 411 411 sm_p->u.rename.refns[index].fs_id = 412 412 sm_p->u.rename.parent_refns[index].fs_id; … … 508 508 with the target name; store it for later removal 509 509 */ 510 sm_p->u.rename.old_dirent_handle =511 resp_p->u.chdirent.old_dirent_handle;510 PVFS_handle_copy(sm_p->u.rename.old_dirent_handle, 511 resp_p->u.chdirent.old_dirent_handle); 512 512 513 513 gossip_debug(GOSSIP_CLIENT_DEBUG, "got back old dirent handle %llu\n", … … 553 553 /* fill in msgpair structure components */ 554 554 msg_p->fs_id = sm_p->u.rename.parent_refns[i].fs_id; 555 msg_p->handle = sm_p->u.rename.parent_refns[i].handle;555 PVFS_handle_copy(msg_p->handle, sm_p->u.rename.parent_refns[i].handle); 556 556 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 557 557 msg_p->comp_fn = rename_lookups_comp_fn; … … 610 610 611 611 msg_p->fs_id = sm_p->u.rename.parent_refns[1].fs_id; 612 msg_p->handle = sm_p->u.rename.parent_refns[1].handle;612 PVFS_handle_copy(msg_p->handle, sm_p->u.rename.parent_refns[1].handle); 613 613 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 614 614 msg_p->comp_fn = rename_crdirent_comp_fn; … … 663 663 msg_p->fs_id = sm_p->u.rename.parent_refns[ 664 664 sm_p->u.rename.rmdirent_index].fs_id; 665 msg_p->handle = sm_p->u.rename.parent_refns[666 sm_p->u.rename. rmdirent_index].handle;665 PVFS_handle_copy(msg_p->handle, 666 sm_p->u.rename.parent_refns[sm_p->u.rename.rmdirent_index].handle); 667 667 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 668 668 msg_p->comp_fn = rename_rmdirent_comp_fn; … … 792 792 793 793 msg_p->fs_id = sm_p->u.rename.parent_refns[1].fs_id; 794 msg_p->handle = sm_p->u.rename.parent_refns[1].handle;794 PVFS_handle_copy(msg_p->handle, sm_p->u.rename.parent_refns[1].handle); 795 795 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 796 796 msg_p->comp_fn = rename_chdirent_comp_fn; … … 828 828 829 829 /* setup the handle to be removed */ 830 sm_p->object_ref.handle = sm_p->u.rename.old_dirent_handle;830 PVFS_handle_copy(sm_p->object_ref.handle, sm_p->u.rename.old_dirent_handle); 831 831 sm_p->object_ref.fs_id = sm_p->u.rename.parent_refns[1].fs_id; 832 832 -
branches/orange-next/src/client/sysint/sys-set-eattr.sm
r8891 r8935 90 90 } /*end if*/ 91 91 92 if (( ref.handle == PVFS_HANDLE_NULL) ||92 if ((PVFS_handle_is_null(ref.handle)) || 93 93 (ref.fs_id == PVFS_FS_ID_NULL)) 94 94 { … … 207 207 208 208 msg_p->fs_id = sm_p->object_ref.fs_id; 209 msg_p->handle = sm_p->object_ref.handle;209 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 210 210 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 211 211 msg_p->comp_fn = set_eattr_comp_fn; -
branches/orange-next/src/client/sysint/sys-setattr.sm
r8679 r8935 85 85 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_setattr entered\n"); 86 86 87 if (( ref.handle == PVFS_HANDLE_NULL) ||87 if ((PVFS_handle_is_null(ref.handle)) || 88 88 (ref.fs_id == PVFS_FS_ID_NULL)) 89 89 { … … 230 230 231 231 msg_p->fs_id = sm_p->object_ref.fs_id; 232 msg_p->handle = sm_p->object_ref.handle;232 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 233 233 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 234 234 msg_p->comp_fn = setattr_msg_comp_fn; -
branches/orange-next/src/client/sysint/sys-small-io.sm
r8869 r8935 119 119 foreach_msgpair(&sm_p->msgarray_op, msg_p, i) 120 120 { 121 datafile_handle = attr->u.meta.dfile_array[122 sm_p->u.io.datafile_index_array[i]];121 PVFS_handle_copy(datafile_handle, 122 attr->u.meta.dfile_array[sm_p->u.io.datafile_index_array[i]]); 123 123 124 124 gossip_debug(GOSSIP_IO_DEBUG, " small_io_setup_msgpairs: " … … 198 198 199 199 msg_p->fs_id = sm_p->object_ref.fs_id; 200 msg_p->handle = datafile_handle;200 PVFS_handle_copy(msg_p->handle, datafile_handle); 201 201 202 202 /*if we are processing a read request and the source file has mirrored … … 227 227 /*store the original datahandle for later use.*/ 228 228 server_nr = msg_p->req.u.small_io.server_nr; 229 sm_p->u.io.small_io_ctx[server_nr].original_datahandle = msg_p->handle; 229 PVFS_handle_copy(sm_p->u.io.small_io_ctx[server_nr].original_datahandle, 230 msg_p->handle); 230 231 } 231 232 … … 493 494 { 494 495 ctx->retry_original = 0; 495 msg->handle = ctx->original_datahandle; 496 msg->req.u.small_io.handle = ctx->original_datahandle; 496 PVFS_handle_copy(msg->handle, ctx->original_datahandle); 497 PVFS_handle_copy(msg->req.u.small_io.handle, 498 ctx->original_datahandle); 497 499 msg->svr_addr = 0; 498 500 ret = PINT_cached_config_map_to_server(&msg->svr_addr … … 521 523 if (meta->mirror_dfile_array[index] != 0) 522 524 { /* we have found a valid mirrored handle */ 523 msg->handle = meta->mirror_dfile_array[index];525 PVFS_handle_copy(msg->handle, meta->mirror_dfile_array[index]); 524 526 break; 525 527 } … … 531 533 if ( copies == meta->mirror_copies_count ) 532 534 { 533 msg->handle = ctx->original_datahandle;535 PVFS_handle_copy(msg->handle, ctx->original_datahandle); 534 536 ctx->retry_original = 0; 535 537 ctx->current_copies_count = 0; 536 538 sm_p->u.io.retry_count++; 537 msg->req.u.small_io.handle = ctx->original_datahandle; 539 PVFS_handle_copy(msg->req.u.small_io.handle, 540 ctx->original_datahandle); 538 541 msg->svr_addr = 0; 539 542 ret=PINT_cached_config_map_to_server(&(msg->svr_addr) … … 552 555 553 556 /* Otherwise, use the discovered mirrored handle */ 554 msg->req.u.small_io.handle = msg->handle;557 PVFS_handle_copy(msg->req.u.small_io.handle, msg->handle); 555 558 msg->svr_addr = 0; 556 ret =PINT_cached_config_map_to_server(&(msg->svr_addr)557 ,msg->handle558 ,msg->fs_id);559 ret = PINT_cached_config_map_to_server(&(msg->svr_addr), 560 msg->handle, 561 msg->fs_id); 559 562 if (ret) 560 563 { … … 602 605 603 606 new_msg->fs_id = msg->fs_id; 604 new_msg->handle = msg->handle;607 PVFS_handle_copy(new_msg->handle, msg->handle); 605 608 new_msg->comp_fn = msg->comp_fn; 606 609 new_msg->svr_addr = msg->svr_addr; -
branches/orange-next/src/client/sysint/sys-symlink.sm
r7471 r8935 160 160 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_symlink entered\n"); 161 161 162 if (( parent_ref.handle == PVFS_HANDLE_NULL) ||162 if ((PVFS_handle_is_null(parent_ref.handle)) || 163 163 (parent_ref.fs_id == PVFS_FS_ID_NULL) || 164 164 (entry_name == NULL) || (resp == NULL) || (target == NULL)) … … 307 307 } 308 308 309 sm_p->u.sym.symlink_handle = resp_p->u.batch_create.handle_array[0]; 309 PVFS_handle_copy(sm_p->u.sym.symlink_handle, 310 resp_p->u.batch_create.handle_array[0]); 310 311 311 312 gossip_debug(GOSSIP_CLIENT_DEBUG, "*** Got newly created symlink " … … 323 324 PVFS_object_ref tmp_ref; 324 325 325 tmp_ref.handle = sm_p->u.sym.symlink_handle;326 PVFS_handle_copy(tmp_ref.handle, sm_p->u.sym.symlink_handle); 326 327 tmp_ref.fs_id = sm_p->object_ref.fs_id; 327 328 … … 394 395 395 396 msg_p->fs_id = sm_p->object_ref.fs_id; 396 msg_p->handle = meta_handle_extent_array.extent_array[0].first; 397 PVFS_handle_copy(msg_p->handle, 398 meta_handle_extent_array.extent_array[0].first); 397 399 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 398 400 msg_p->comp_fn = symlink_create_comp_fn; … … 435 437 436 438 msg_p->fs_id = sm_p->object_ref.fs_id; 437 msg_p->handle = sm_p->object_ref.handle;439 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 438 440 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 439 441 msg_p->comp_fn = symlink_crdirent_comp_fn; … … 499 501 500 502 msg_p->fs_id = sm_p->object_ref.fs_id; 501 msg_p->handle = sm_p->u.sym.symlink_handle;503 PVFS_handle_copy(msg_p->handle, sm_p->u.sym.symlink_handle); 502 504 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 503 505 msg_p->comp_fn = symlink_setattr_comp_fn; … … 545 547 546 548 msg_p->fs_id = sm_p->object_ref.fs_id; 547 msg_p->handle = sm_p->u.sym.symlink_handle;549 PVFS_handle_copy(msg_p->handle, sm_p->u.sym.symlink_handle); 548 550 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 549 551 msg_p->comp_fn = symlink_delete_handle_comp_fn; … … 582 584 if (sm_p->error_code == 0) 583 585 { 584 symlink_ref.handle = sm_p->u.sym.symlink_handle;586 PVFS_handle_copy(symlink_ref.handle, sm_p->u.sym.symlink_handle); 585 587 symlink_ref.fs_id = sm_p->object_ref.fs_id; 586 588 -
branches/orange-next/src/client/sysint/sys-truncate.sm
r8317 r8935 117 117 118 118 if ((ref.fs_id == PVFS_FS_ID_NULL) || 119 ( ref.handle == PVFS_HANDLE_NULL))119 (PVFS_handle_is_null(ref.handle)) ) 120 120 { 121 121 gossip_err("invalid (NULL) required argument\n"); … … 262 262 */ 263 263 msg_p->fs_id = sm_p->object_ref.fs_id; 264 msg_p->handle = attr->u.meta.dfile_array[i];264 PVFS_handle_copy(msg_p->handle, attr->u.meta.dfile_array[i]); 265 265 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 266 266 msg_p->comp_fn = NULL; … … 418 418 419 419 msg_p->fs_id = sm_p->object_ref.fs_id; 420 msg_p->handle = sm_p->object_ref.handle;420 PVFS_handle_copy(msg_p->handle, sm_p->object_ref.handle); 421 421 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 422 422 msg_p->comp_fn = unstuff_comp_fn; -
branches/orange-next/src/common/misc/fsck-utils.c
r8932 r8935 365 365 366 366 /* Build the needed PVFS_Object reference needed for API calls */ 367 obj_ref.handle = *handle;367 PVFS_handle_copy(obj_ref.handle, *handle); 368 368 obj_ref.fs_id = *cur_fs; 369 369 … … 487 487 { 488 488 err = PVFS_fsck_validate_dfile(fsck_options, 489 &df_handles[i],489 (const PVFS_handle *)&df_handles[i], 490 490 &obj_ref->fs_id, 491 491 creds, &dfiles_total_size); … … 680 680 memset(&dirdata_attributes, 0, sizeof(dirdata_attributes)); 681 681 682 obj_ref.handle = *handle;682 PVFS_handle_copy(obj_ref.handle, *handle); 683 683 obj_ref.fs_id = *cur_fs; 684 684 … … 757 757 int err = 0; 758 758 int current_dir_entry = 0; 759 PVFS_ds_position token = PVFS_READDIR_START; 759 PVFS_kv_position token; 760 unsigned int token_flag = PVFS_READDIR_START; 760 761 PVFS_sysresp_readdir readdir_resp; 761 762 PVFS_handle dirdata_handle; … … 788 789 } 789 790 790 err = PVFS_fsck_validate_dirdata 791 ( fsck_options,&dirdata_handle, &obj_ref->fs_id, creds);791 err = PVFS_fsck_validate_dirdata(fsck_options, 792 (const PVFS_handle *)&dirdata_handle, &obj_ref->fs_id, creds); 792 793 if(err < 0) 793 794 { … … 803 804 804 805 err = PVFS_sys_readdir(*obj_ref, 805 token, 806 MAX_DIR_ENTS, 807 (PVFS_credentials *) creds, &readdir_resp, NULL); 806 token, 807 &token_flag, 808 MAX_DIR_ENTS, 809 (PVFS_credentials *) creds, &readdir_resp, NULL); 808 810 if(err < 0) 809 811 { … … 817 819 readdir_resp.dirent_array[i].d_name, PVFS_NAME_MAX + 1); 818 820 819 directory_entries[current_dir_entry].handle =820 readdir_resp.dirent_array[i].handle;821 PVFS_handle_copy(directory_entries[current_dir_entry].handle, 822 readdir_resp.dirent_array[i].handle); 821 823 current_dir_entry++; 822 824 … … 837 839 838 840 free(readdir_resp.dirent_array); 839 token = readdir_resp.token;841 memcpy(&token, &readdir_resp.token, sizeof(PVFS_kv_position)); 840 842 841 843 } while (readdir_resp.pvfs_dirent_outcount == MAX_DIR_ENTS); … … 1066 1068 int *handle_count_array = NULL; 1067 1069 PVFS_ds_position *position_array = NULL; 1070 unsigned int *position_flag_array = NULL; 1068 1071 int more_handles = 0; 1069 1072 int err = 0; … … 1145 1148 } 1146 1149 1150 position_flag_array = (unsigned int *) calloc(server_count, 1151 sizeof(unsigned int)); 1152 if( position_flag_array == NULL ) 1153 { 1154 ret = -PVFS_ENOMEM; 1155 goto load_handles_error; 1156 } 1157 1147 1158 PINT_handle_wrangler_handlelist.list_array = 1148 1159 (PVFS_handle **) calloc(server_count, sizeof(PVFS_handle *)); … … 1199 1210 memset(handle_matrix, 0, server_count*sizeof(PVFS_handle*)); 1200 1211 1201 /* populating a nice "handlelist" struct with all this various handle data */ 1212 /* populating a nice "handlelist" struct with all this various handle 1213 * data */ 1202 1214 for (i = 0; i < server_count; i++) 1203 1215 { … … 1236 1248 1237 1249 /* FIX: position stuff changed to use small int and flag */ 1238 position_ array[i] = PVFS_ITERATE_START;1250 position_flag_array[i] = PVFS_ITERATE_START; 1239 1251 handle_count_array[i] = HANDLE_BATCH; 1240 1252 } … … 1249 1261 handle_count_array, 1250 1262 position_array, 1263 NULL, 1264 position_flag_array, 1251 1265 PINT_handle_wrangler_handlelist.addr_array, 1252 1266 server_count, … … 1269 1283 for (j = 0; j < handle_count_array[i]; j++) 1270 1284 { 1271 P INT_handle_wrangler_handlelist.list_array[i]1272 [PINT_handle_wrangler_handlelist.used_array[i] + j] =1273 handle_matrix[i][j] ;1285 PVFS_handle_copy(PINT_handle_wrangler_handlelist.list_array[i] 1286 [PINT_handle_wrangler_handlelist.used_array[i] + j], 1287 handle_matrix[i][j]); 1274 1288 } 1275 1289 … … 1279 1293 /* are there more handles? */ 1280 1294 /* FIX: position stuff changed to use small int and flag */ 1281 if (position_ array[i] != PVFS_ITERATE_END)1295 if (position_flag_array[i] != PVFS_ITERATE_END) 1282 1296 { 1283 1297 more_handles = 1; … … 1302 1316 { 1303 1317 /* FIX: position stuff changed to use small int and flag */ 1304 position_ array[i] = PVFS_ITERATE_START;1318 position_flag_array[i] = PVFS_ITERATE_START; 1305 1319 handle_count_array[i] = HANDLE_BATCH; 1306 1320 } … … 1313 1327 handle_count_array, 1314 1328 position_array, 1329 NULL, 1330 position_flag_array, 1315 1331 PINT_handle_wrangler_handlelist.addr_array, 1316 1332 server_count, … … 1333 1349 for (j = 0; j < handle_count_array[i]; j++) 1334 1350 { 1335 PINT_handle_wrangler_remove_handle( &handle_matrix[i][j],1336 cur_fs);1351 PINT_handle_wrangler_remove_handle( 1352 (const PVFS_handle *)&(handle_matrix[i][j]), cur_fs); 1337 1353 } 1338 1354 1339 1355 /* are there more handles? */ 1340 1356 /* FIX: position stuff changed to use small int and flag */ 1341 if (position_ array[i] != PVFS_ITERATE_END)1357 if (position_flag_array[i] != PVFS_ITERATE_END) 1342 1358 { 1343 1359 more_handles = 1; … … 1392 1408 if(position_array) 1393 1409 free(position_array); 1410 if(position_flag_array) 1411 free(position_flag_array); 1394 1412 if(handle_count_array) 1395 1413 free(handle_count_array); … … 1419 1437 1420 1438 /* find which server the handle is on */ 1421 ret = PINT_cached_config_map_to_server(&server_addr, *handle, *cur_fs); 1439 ret = PINT_cached_config_map_to_server(&server_addr, 1440 *(PVFS_handle *)handle, *cur_fs); 1422 1441 if(ret < 0) 1423 1442 { … … 1543 1562 if (!PINT_handle_wrangler_handlelist.list_array_seen[i][j]) 1544 1563 { 1545 pref.handle = PINT_handle_wrangler_handlelist.list_array[i][j]; 1564 PVFS_handle_copy(pref.handle, 1565 PINT_handle_wrangler_handlelist.list_array[i][j]); 1546 1566 pref.fs_id = *cur_fs; 1547 1567 -
branches/orange-next/src/common/misc/mkspace.c
r8934 r8935 36 36 fprintf(stderr,format, ##f); \ 37 37 } while(0) 38 39 static int handle_is_excluded(40 TROVE_handle handle, TROVE_handle *handles_to_exclude,41 int num_handles_to_exclude)42 {43 int excluded = 0;44 45 while((num_handles_to_exclude - 1) > -1)46 {47 if (handle == handles_to_exclude[num_handles_to_exclude-1])48 {49 excluded = 1;50 break;51 }52 num_handles_to_exclude--;53 }54 return excluded;55 }56 38 57 39 int pvfs2_mkspace( … … 66 48 int verbose) 67 49 { 68 int ret = - 1, count = 0 ;50 int ret = - 1, count = 0, i = 0; 69 51 TROVE_op_id op_id; 70 52 TROVE_ds_state state; 71 53 TROVE_keyval_s key, val; 72 54 TROVE_ds_attributes_s attr; 73 TROVE_handle_extent cur_extent;74 TROVE_handle_extent_array extent_array;75 55 TROVE_context_id trove_context = -1; 76 56 char *merged_handle_ranges = NULL; 77 TROVE_handle new_root_handle = TROVE_HANDLE_NULL;78 TROVE_handle root_dirdata_handle = TROVE_HANDLE_NULL;79 TROVE_handle lost_and_found_handle = TROVE_HANDLE_NULL;80 TROVE_handle lost_and_found_dirdata_handle = TROVE_HANDLE_NULL;57 TROVE_handle new_root_handle; 58 TROVE_handle root_dirdata_handle; 59 TROVE_handle lost_and_found_handle; 60 TROVE_handle lost_and_found_dirdata_handle; 81 61 82 62 mkspace_print(verbose,"Data storage space : %s\n",data_path); … … 92 72 data_handle_ranges : "NONE")); 93 73 94 new_root_handle = root_handle; 74 PVFS_handle_clear(new_root_handle); 75 PVFS_handle_clear(root_dirdata_handle); 76 PVFS_handle_clear(lost_and_found_handle); 77 PVFS_handle_clear(lost_and_found_dirdata_handle); 78 79 80 PVFS_handle_copy(new_root_handle,root_handle); 95 81 96 82 /* clear out the 4 s_used_handles defined globally. should re-visit if … … 234 220 attributes on the dspace 235 221 */ 236 if (new_root_handle != TROVE_HANDLE_NULL) 237 { 238 cur_extent.first = cur_extent.last = new_root_handle; 239 extent_array.extent_count = 1; 240 extent_array.extent_array = &cur_extent; 241 222 if (! PVFS_handle_is_null(new_root_handle) ) 223 { 242 224 ret = trove_dspace_create( 243 coll_id, & extent_array, &new_root_handle,225 coll_id, &new_root_handle, 244 226 PVFS_TYPE_DIRECTORY, NULL, 245 227 (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), … … 262 244 mkspace_print(verbose,"info: created root directory " 263 245 "with handle %llu.\n", llu(new_root_handle)); 264 s_used_handles[0] = new_root_handle;246 PVFS_handle_copy(s_used_handles[0], new_root_handle); 265 247 266 248 /* set collection attribute for root handle */ 267 249 key.buffer = ROOT_HANDLE_KEYSTR; 268 250 key.buffer_sz = ROOT_HANDLE_KEYLEN; 269 val.buffer = &new_root_handle;251 PVFS_handle_copy(*(PVFS_handle *)val.buffer, new_root_handle); 270 252 val.buffer_sz = sizeof(new_root_handle); 271 253 ret = trove_collection_seteattr(coll_id, &key, &val, 0, … … 312 294 } 313 295 314 /*315 create a dataspace to hold directory entries; if we have a316 meta handle range, use that one of those ranges (being317 careful to make sure the range has enough space for an318 allocation) to allocate a dataspace to hold directory319 entries. if we don't have a meta handle range, use320 TROVE_HANDLE_NULL which tells the allocator to use any321 handle available322 */323 cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL;324 if (meta_handle_ranges)325 {326 get_handle_extent_from_ranges(327 meta_handle_ranges, &cur_extent, s_used_handles, 1);328 329 if ((cur_extent.first == TROVE_HANDLE_NULL) &&330 (cur_extent.last == TROVE_HANDLE_NULL))331 {332 gossip_err("No valid meta handle ranges available! "333 "Using a default\n");334 }335 else336 {337 mkspace_print(338 verbose, "info: using meta handle range %llu-%llu for "339 "root dirent dspace\n", llu(cur_extent.first),340 llu(cur_extent.last));341 }342 }343 344 extent_array.extent_count = 1;345 extent_array.extent_array = &cur_extent;346 347 296 ret = trove_dspace_create( 348 coll_id, &extent_array, &root_dirdata_handle, 349 PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, 350 trove_context, &op_id, NULL); 297 coll_id, &root_dirdata_handle, PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, 298 NULL, trove_context, &op_id, NULL); 351 299 352 300 while (ret == 0) … … 365 313 mkspace_print(verbose, "info: created dspace for dirents " 366 314 "with handle %llu\n", llu(root_dirdata_handle)); 367 s_used_handles[1] = root_dirdata_handle;315 PVFS_handle_copy(s_used_handles[1], root_dirdata_handle); 368 316 369 317 key.buffer = DIRECTORY_ENTRY_KEYSTR; 370 318 key.buffer_sz = DIRECTORY_ENTRY_KEYLEN; 371 val.buffer = &root_dirdata_handle;319 PVFS_handle_copy(*(PVFS_handle*)val.buffer, root_dirdata_handle); 372 320 val.buffer_sz = sizeof(TROVE_handle); 373 321 … … 398 346 lost+found directory as well 399 347 *****************************************************/ 400 cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL;401 if (meta_handle_ranges)402 {403 get_handle_extent_from_ranges(404 meta_handle_ranges, &cur_extent, s_used_handles, 2);405 406 if ((cur_extent.first == TROVE_HANDLE_NULL) &&407 (cur_extent.last == TROVE_HANDLE_NULL))408 {409 gossip_err("No valid meta handle ranges available! "410 "Using a default\n");411 }412 else413 {414 mkspace_print(415 verbose, "info: using meta handle range %llu-%llu for "416 "lost+found directory dspace\n", llu(cur_extent.first),417 llu(cur_extent.last));418 }419 }420 extent_array.extent_count = 1;421 extent_array.extent_array = &cur_extent;422 423 348 ret = trove_dspace_create( 424 coll_id, &extent_array, &lost_and_found_handle, 425 PVFS_TYPE_DIRECTORY, NULL, TROVE_SYNC, NULL, 426 trove_context, &op_id, NULL); 349 coll_id, &lost_and_found_handle, PVFS_TYPE_DIRECTORY, NULL, 350 TROVE_SYNC, NULL, trove_context, &op_id, NULL); 427 351 428 352 while (ret == 0) … … 442 366 mkspace_print(verbose,"info: created lost+found directory " 443 367 "with handle %llu.\n", llu(lost_and_found_handle)); 444 s_used_handles[2] = lost_and_found_handle;368 PVFS_handle_copy(s_used_handles[2], lost_and_found_handle); 445 369 446 370 /* set lost+found directory dspace attributes */ … … 472 396 473 397 /* create a dataspace to hold directory entries */ 474 cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL;475 if (meta_handle_ranges)476 {477 get_handle_extent_from_ranges(478 meta_handle_ranges, &cur_extent, s_used_handles, 3);479 480 if ((cur_extent.first == TROVE_HANDLE_NULL) &&481 (cur_extent.last == TROVE_HANDLE_NULL))482 {483 gossip_err("No valid meta handle ranges available! "484 "Using a default\n");485 }486 else487 {488 mkspace_print(489 verbose, "info: using meta handle range %llu-%llu for "490 "lost+found dirent dspace\n", llu(cur_extent.first),491 llu(cur_extent.last));492 }493 }494 extent_array.extent_count = 1;495 extent_array.extent_array = &cur_extent;496 497 398 ret = trove_dspace_create( 498 coll_id, &extent_array, &lost_and_found_dirdata_handle, 499 PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, 500 trove_context, &op_id, NULL); 399 coll_id, &lost_and_found_dirdata_handle, PVFS_TYPE_DIRDATA, NULL, 400 TROVE_SYNC, NULL, trove_context, &op_id, NULL); 501 401 502 402 while (ret == 0) … … 516 416 verbose, "info: created dspace for dirents " 517 417 "with handle %llu\n", llu(lost_and_found_dirdata_handle)); 518 s_used_handles[3] = lost_and_found_dirdata_handle;418 PVFS_handle_copy(s_used_handles[3], lost_and_found_dirdata_handle); 519 419 520 420 key.buffer = DIRECTORY_ENTRY_KEYSTR; 521 421 key.buffer_sz = DIRECTORY_ENTRY_KEYLEN; 522 val.buffer = &lost_and_found_dirdata_handle; 422 PVFS_handle_copy(*(PVFS_handle *)val.buffer, 423 lost_and_found_dirdata_handle); 523 424 val.buffer_sz = sizeof(TROVE_handle); 524 425 … … 552 453 key.buffer = lost_and_found_string; 553 454 key.buffer_sz = strlen(lost_and_found_string) + 1; 554 val.buffer = &lost_and_found_handle;455 PVFS_handle_copy(*(PVFS_handle *)val.buffer, lost_and_found_handle); 555 456 val.buffer_sz = sizeof(TROVE_handle); 556 457 -
branches/orange-next/src/common/misc/mmap-ra-cache.c
r6268 r8935 261 261 { 262 262 unsigned long tmp = 0; 263 unsigned long h_hash = 0; 263 264 PVFS_object_ref *refn = (PVFS_object_ref *)key; 264 265 265 tmp += ((refn->handle << 2) | (refn->fs_id)); 266 /* FIX: clean this up to be a reasonable hash */ 267 PVFS_handle_to_hash(refn->handle, &h_hash); 268 tmp += ((h_hash) | (refn->fs_id)); 266 269 tmp = (tmp % table_size); 267 270 -
branches/orange-next/src/common/misc/pint-cached-config.c
r8934 r8935 71 71 72 72 static int cache_server_array(PVFS_fs_id fsid); 73 static int handle_lookup_entry_compare(const void *p1, const void *p2);74 static const struct handle_lookup_entry* find_handle_lookup_entry(75 PVFS_handle handle, PVFS_fs_id fsid);76 static int load_handle_lookup_table(77 struct config_fs_cache_s *cur_config_fs_cache);78 73 79 74 static int meta_randomized = 0; … … 243 238 { 244 239 struct config_fs_cache_s *cur_config_fs_cache = NULL; 245 int ret;246 240 247 241 if (fs) … … 253 247 254 248 cur_config_fs_cache->fs = (struct filesystem_configuration_s *)fs; 255 256 cur_config_fs_cache->meta_server_cursor = 257 cur_config_fs_cache->fs->meta_handle_ranges; 258 cur_config_fs_cache->data_server_cursor = 259 cur_config_fs_cache->fs->data_handle_ranges; 260 261 /* populate table used to speed up mapping of handle values 262 * to servers 263 */ 264 ret = load_handle_lookup_table(cur_config_fs_cache); 265 if(ret < 0) 266 { 267 free(cur_config_fs_cache); 268 gossip_err("Error: failed to load handle lookup table.\n"); 269 return(ret); 270 } 271 272 qhash_add(PINT_fsid_config_cache_table, 273 &(cur_config_fs_cache->fs->coll_id), 274 &(cur_config_fs_cache->hash_link)); 275 } 276 249 } 277 250 return 0; 278 251 } … … 1044 1017 PVFS_fs_id fs_id) 1045 1018 { 1046 const struct handle_lookup_entry* tmp_entry; 1047 1048 tmp_entry = find_handle_lookup_entry(handle, fs_id); 1049 1050 if(!tmp_entry) 1051 { 1052 gossip_err("Error: failed to find handle %llu in fs configuration.\n", 1053 llu(handle)); 1054 return(-PVFS_EINVAL); 1055 } 1056 1057 *server_addr = tmp_entry->server_addr; 1019 1020 /* FIX: this will need to integrate with the new handle->server mapping 1021 * mechanism */ 1058 1022 return(0); 1059 1023 } … … 1198 1162 struct qlist_head *hash_link = NULL; 1199 1163 struct config_fs_cache_s *cur_config_cache = NULL; 1200 struct host_handle_mapping_s *server_mapping = NULL;1201 1164 1202 1165 *handle_count = 0; … … 1214 1177 assert(cur_config_cache->fs); 1215 1178 1216 server_mapping = PINT_cached_config_find_server( 1217 cur_config_cache->fs->meta_handle_ranges, server_addr_str); 1218 if(server_mapping) 1219 { 1220 *handle_count += PINT_extent_array_count_total( 1221 &server_mapping->handle_extent_array); 1222 } 1223 1224 server_mapping = PINT_cached_config_find_server( 1225 cur_config_cache->fs->data_handle_ranges, server_addr_str); 1226 if(server_mapping) 1227 { 1228 *handle_count += PINT_extent_array_count_total( 1229 &server_mapping->handle_extent_array); 1230 } 1179 /* FIX: what do we count when we don't have extents? */ 1231 1180 } 1232 1181 return 0; … … 1246 1195 PVFS_fs_id fsid) 1247 1196 { 1248 const struct handle_lookup_entry* tmp_entry; 1249 1250 tmp_entry = find_handle_lookup_entry(handle, fsid); 1251 1252 if(!tmp_entry) 1253 { 1254 gossip_err("Error: failed to find handle %llu in fs configuration.\n", 1255 llu(handle)); 1256 return(-PVFS_EINVAL); 1257 } 1258 1259 strncpy(server_name, tmp_entry->server_name, max_server_name_len); 1197 /* FIX: book keeping that will be written can answer this question */ 1260 1198 return(0); 1261 1199 } … … 1287 1225 assert(cur_config_cache->fs); 1288 1226 1289 *fh_root = (PVFS_handle)cur_config_cache->fs->root_handle;1227 PVFS_handle_copy(*fh_root, cur_config_cache->fs->root_handle); 1290 1228 ret = 0; 1291 1229 } … … 1609 1547 } 1610 1548 1611 /* handle_lookup_entry_compare()1612 * *1613 * * comparison function used by qsort()1614 * */1615 static int handle_lookup_entry_compare(const void *p1, const void *p2)1616 {1617 const struct handle_lookup_entry* e1 = p1;1618 const struct handle_lookup_entry* e2 = p2;1619 1620 if(e1->extent.first < e2->extent.first)1621 return(-1);1622 if(e1->extent.first > e2->extent.first)1623 return(1);1624 1625 return(0);1626 }1627 1628 /* find_handle_lookup_entry()1629 *1630 * searches sorted table for extent that contains the specified handle1631 *1632 * returns pointer to table entry on success, NULL on failure1633 */1634 static const struct handle_lookup_entry* find_handle_lookup_entry(1635 PVFS_handle handle, PVFS_fs_id fsid)1636 {1637 struct qlist_head *hash_link = NULL;1638 struct config_fs_cache_s *cur_config_cache = NULL;1639 int high, low, mid;1640 int table_index;1641 1642 assert(PINT_fsid_config_cache_table);1643 1644 hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid));1645 if(!hash_link)1646 {1647 return(NULL);1648 }1649 1650 cur_config_cache = qlist_entry(1651 hash_link, struct config_fs_cache_s, hash_link);1652 1653 assert(cur_config_cache);1654 assert(cur_config_cache->fs);1655 1656 /* iterative binary search through handle lookup table to find the1657 * extent that this handle falls into1658 */1659 low = 0;1660 high = cur_config_cache->handle_lookup_table_size;1661 while (low < high)1662 {1663 mid = (low + high)/2;1664 if (cur_config_cache->handle_lookup_table[mid].extent.first < handle)1665 low = mid + 1;1666 else1667 high = mid;1668 }1669 if ((low < cur_config_cache->handle_lookup_table_size) &&1670 (cur_config_cache->handle_lookup_table[low].extent.first == handle))1671 {1672 /* we happened to locate the first handle in a range */1673 table_index = low;1674 }1675 else1676 {1677 /* this handle must fall into the previous range if any */1678 table_index = low-1;1679 }1680 1681 /* confirm match */1682 if(PINT_handle_in_extent(1683 &cur_config_cache->handle_lookup_table[table_index].extent,1684 handle))1685 {1686 return(&cur_config_cache->handle_lookup_table[table_index]);1687 }1688 1689 /* no match */1690 return(NULL);1691 }1692 1693 /* load_handle_lookup_table()1694 *1695 * iterates through extents for all servers and constructs a table sorted by1696 * the first handle in each extent. This table can then be searched with a1697 * binary algorithm to map handles to servers. Table includes extent,1698 * server name, and server's resolved bmi address.1699 *1700 * returns 0 on success, -PVFS_error on failure1701 */1702 static int load_handle_lookup_table(1703 struct config_fs_cache_s *cur_config_fs_cache)1704 {1705 int ret = -PVFS_EINVAL;1706 host_handle_mapping_s *cur_mapping = NULL;1707 int count = 0;1708 int table_offset = 0;1709 PINT_llist* server_cursor;1710 int i;1711 int j;1712 PINT_llist* range_list[2] =1713 {1714 cur_config_fs_cache->fs->meta_handle_ranges,1715 cur_config_fs_cache->fs->data_handle_ranges1716 };1717 1718 /* count total number of extents */1719 /* loop through both meta and data ranges */1720 for(j=0; j<2; j++)1721 {1722 server_cursor = range_list[j];1723 cur_mapping = PINT_llist_head(server_cursor);1724 while(cur_mapping)1725 {1726 /* each server may have multiple extents */1727 for(i=0; i<cur_mapping->handle_extent_array.extent_count; i++)1728 {1729 count += 1;1730 }1731 server_cursor = PINT_llist_next(server_cursor);1732 cur_mapping = PINT_llist_head(server_cursor);1733 }1734 }1735 1736 /* allocate a table to hold all extents for faster searching */1737 if(cur_config_fs_cache->handle_lookup_table)1738 {1739 free(cur_config_fs_cache->handle_lookup_table);1740 }1741 cur_config_fs_cache->handle_lookup_table =1742 malloc(sizeof(*cur_config_fs_cache->handle_lookup_table) * count);1743 if(!cur_config_fs_cache->handle_lookup_table)1744 {1745 return(-PVFS_ENOMEM);1746 }1747 cur_config_fs_cache->handle_lookup_table_size = count;1748 1749 /* populate table */1750 /* loop through both meta and data ranges */1751 for(j=0; j<2; j++)1752 {1753 server_cursor = range_list[j];1754 cur_mapping = PINT_llist_head(server_cursor);1755 while(cur_mapping)1756 {1757 for(i=0; i<cur_mapping->handle_extent_array.extent_count; i++)1758 {1759 cur_config_fs_cache->handle_lookup_table[table_offset].extent1760 = cur_mapping->handle_extent_array.extent_array[i];1761 cur_config_fs_cache->handle_lookup_table[table_offset].server_name1762 = cur_mapping->alias_mapping->bmi_address;1763 ret = BMI_addr_lookup(1764 &cur_config_fs_cache->handle_lookup_table[table_offset].server_addr,1765 cur_config_fs_cache->handle_lookup_table[table_offset].server_name);1766 if(ret < 0)1767 {1768 free(cur_config_fs_cache->handle_lookup_table);1769 gossip_err("Error: failed to resolve address of server: %s\n",1770 cur_config_fs_cache->handle_lookup_table[table_offset].server_name);1771 return(ret);1772 }1773 table_offset++;1774 }1775 server_cursor = PINT_llist_next(server_cursor);1776 cur_mapping = PINT_llist_head(server_cursor);1777 }1778 }1779 1780 /* sort table */1781 qsort(cur_config_fs_cache->handle_lookup_table, table_offset,1782 sizeof(*cur_config_fs_cache->handle_lookup_table),1783 handle_lookup_entry_compare);1784 1785 return(0);1786 }1787 1788 1549 /* PINT_cached_config_server_names() 1789 1550 * -
branches/orange-next/src/common/misc/server-config.c
r8934 r8935 127 127 /* internal helper functions */ 128 128 static int is_valid_alias(PINT_llist * host_aliases, char *str); 129 static int is_valid_handle_range_description(char *h_range);130 129 static void free_host_handle_mapping(void *ptr); 131 130 static void free_host_alias(void *ptr); … … 153 152 char *alias, 154 153 int *index); 155 static struct host_handle_mapping_s *get_or_add_handle_mapping(156 PINT_llist *list,157 char *alias);158 static int build_extent_array(159 char *handle_range_str,160 PVFS_handle_extent_array *handle_extent_array);161 154 162 155 #ifdef __PVFS2_TROVE_SUPPORT__ … … 2701 2694 DOTCONF_CB(get_range_list) 2702 2695 { 2703 int i = 0 , is_new_handle_mapping = 0;2696 int i = 0; 2704 2697 struct filesystem_configuration_s *fs_conf = NULL; 2705 struct host_handle_mapping_s *handle_mapping = NULL;2706 PINT_llist **handle_range_list = NULL;2707 2698 struct server_configuration_s *config_s = 2708 2699 (struct server_configuration_s *)cmd->context; 2709 2700 2710 2701 fs_conf = (struct filesystem_configuration_s *) 2711 PINT_llist_head(config_s->file_systems);2702 PINT_llist_head(config_s->file_systems); 2712 2703 assert(fs_conf); 2713 2714 handle_range_list = ((config_s->configuration_context ==2715 CTX_METAHANDLERANGES) ?2716 &fs_conf->meta_handle_ranges :2717 &fs_conf->data_handle_ranges);2718 2719 if (*handle_range_list == NULL)2720 {2721 *handle_range_list = PINT_llist_new();2722 }2723 2704 2724 2705 for(i = 0; i < cmd->arg_count; i += 2) … … 2729 2710 assert(cmd->data.list[i]); 2730 2711 2731 if (is_valid_handle_range_description(cmd->data.list[i]))2732 {2733 handle_mapping = get_or_add_handle_mapping(2734 *handle_range_list, cmd->data.list[i-1]);2735 if (!handle_mapping)2736 {2737 return("Error: Alias allocation failed; "2738 "aborting alias handle range addition!\n");2739 }2740 2741 if (!handle_mapping->alias_mapping)2742 {2743 is_new_handle_mapping = 1;2744 handle_mapping->alias_mapping =2745 find_host_alias_ptr_by_alias(2746 config_s, cmd->data.list[i-1], NULL);2747 }2748 2749 assert(handle_mapping->alias_mapping ==2750 find_host_alias_ptr_by_alias(2751 config_s, cmd->data.list[i-1], NULL));2752 2753 if (!handle_mapping->handle_range &&2754 !handle_mapping->handle_extent_array.extent_array)2755 {2756 handle_mapping->handle_range =2757 strdup(cmd->data.list[i]);2758 2759 /* build the extent array, based on range */2760 build_extent_array(2761 handle_mapping->handle_range,2762 &handle_mapping->handle_extent_array);2763 }2764 else2765 {2766 char *new_handle_range = PINT_merge_handle_range_strs(2767 handle_mapping->handle_range, cmd->data.list[i]);2768 free(handle_mapping->handle_range);2769 handle_mapping->handle_range = new_handle_range;2770 2771 /* re-build the extent array, based on range */2772 free(handle_mapping->handle_extent_array.extent_array);2773 build_extent_array(handle_mapping->handle_range,2774 &handle_mapping->handle_extent_array);2775 }2776 2777 if (is_new_handle_mapping)2778 {2779 PINT_llist_add_to_tail(*handle_range_list,2780 (void *)handle_mapping);2781 }2782 }2783 else2784 {2785 return("Error in handle range description.\n");2786 }2787 2712 } 2788 2713 else … … 3165 3090 } 3166 3091 3167 static int is_valid_handle_range_description(char *h_range)3168 {3169 int ret = 0;3170 int len = 0;3171 char *ptr = (char *)0;3172 char *end = (char *)0;3173 3174 if (h_range)3175 {3176 len = strlen(h_range);3177 end = (h_range + len);3178 3179 for(ptr = h_range; ptr < end; ptr++)3180 {3181 if (!isdigit((int)*ptr) && (*ptr != ',') &&3182 (*ptr != ' ') && (*ptr != '-'))3183 {3184 break;3185 }3186 }3187 if (ptr == end)3188 {3189 ret = 1;3190 }3191 }3192 return ret;3193 }3194 3195 3092 static int is_populated_filesystem_configuration( 3196 3093 struct filesystem_configuration_s *fs) … … 3401 3298 struct filesystem_configuration_s *src_fs) 3402 3299 { 3403 PINT_llist *cur = NULL;3404 struct host_handle_mapping_s *cur_h_mapping = NULL;3405 struct host_handle_mapping_s *new_h_mapping = NULL;3406 3407 3300 if (dest_fs && src_fs) 3408 3301 { … … 3417 3310 dest_fs->encoding = src_fs->encoding; 3418 3311 3419 dest_fs->meta_handle_ranges = PINT_llist_new();3420 dest_fs->data_handle_ranges = PINT_llist_new();3421 3422 3312 if(src_fs->secret_key) 3423 3313 { 3424 3314 dest_fs->secret_key = strdup(src_fs->secret_key); 3425 }3426 3427 assert(dest_fs->meta_handle_ranges);3428 assert(dest_fs->data_handle_ranges);3429 3430 /* copy all meta handle ranges */3431 cur = src_fs->meta_handle_ranges;3432 while(cur)3433 {3434 cur_h_mapping = PINT_llist_head(cur);3435 if (!cur_h_mapping)3436 {3437 break;3438 }3439 3440 new_h_mapping = (struct host_handle_mapping_s *)3441 malloc(sizeof(struct host_handle_mapping_s));3442 assert(new_h_mapping);3443 3444 /* these are pointers into another struct with a different3445 * lifetime, do not copy */3446 new_h_mapping->alias_mapping = cur_h_mapping->alias_mapping;3447 3448 new_h_mapping->handle_range =3449 strdup(cur_h_mapping->handle_range);3450 assert(new_h_mapping->handle_range);3451 3452 build_extent_array(new_h_mapping->handle_range,3453 &new_h_mapping->handle_extent_array);3454 3455 PINT_llist_add_to_tail(3456 dest_fs->meta_handle_ranges, new_h_mapping);3457 3458 cur = PINT_llist_next(cur);3459 }3460 3461 /* copy all data handle ranges */3462 cur = src_fs->data_handle_ranges;3463 while(cur)3464 {3465 cur_h_mapping = PINT_llist_head(cur);3466 if (!cur_h_mapping)3467 {3468 break;3469 }3470 3471 new_h_mapping = (struct host_handle_mapping_s *)3472 malloc(sizeof(struct host_handle_mapping_s));3473 assert(new_h_mapping);3474 3475 new_h_mapping->alias_mapping = cur_h_mapping->alias_mapping;3476 3477 new_h_mapping->handle_range =3478 strdup(cur_h_mapping->handle_range);3479 assert(new_h_mapping->handle_range);3480 3481 build_extent_array(new_h_mapping->handle_range,3482 &new_h_mapping->handle_extent_array);3483 3484 PINT_llist_add_to_tail(3485 dest_fs->data_handle_ranges, new_h_mapping);3486 3487 cur = PINT_llist_next(cur);3488 3315 } 3489 3316 … … 3603 3430 if(index) *index = ind - 1; 3604 3431 return ret; 3605 }3606 3607 static struct host_handle_mapping_s *get_or_add_handle_mapping(3608 PINT_llist *list,3609 char *alias)3610 {3611 PINT_llist *cur = list;3612 struct host_handle_mapping_s *ret = NULL;3613 struct host_handle_mapping_s *handle_mapping = NULL;3614 3615 while(cur)3616 {3617 handle_mapping = PINT_llist_head(cur);3618 if (!handle_mapping)3619 {3620 break;3621 }3622 assert(handle_mapping->alias_mapping);3623 assert(handle_mapping->alias_mapping->host_alias);3624 assert(handle_mapping->handle_range);3625 3626 if (strcmp(handle_mapping->alias_mapping->host_alias,3627 alias) == 0)3628 {3629 ret = handle_mapping;3630 break;3631 }3632 cur = PINT_llist_next(cur);3633 }3634 3635 if (!ret)3636 {3637 ret = (host_handle_mapping_s *)3638 malloc(sizeof(struct host_handle_mapping_s));3639 if (ret)3640 {3641 memset(ret,0,sizeof(struct host_handle_mapping_s));3642 }3643 }3644 return ret;3645 }3646 3647 static int build_extent_array(3648 char *handle_range_str,3649 PVFS_handle_extent_array *handle_extent_array)3650 {3651 int i = 0, status = 0, num_extents = 0;3652 PVFS_handle_extent cur_extent;3653 3654 if (handle_range_str && handle_extent_array)3655 {3656 /* first pass, find out how many extents there are total */3657 while(PINT_parse_handle_ranges(handle_range_str,3658 &cur_extent, &status))3659 {3660 num_extents++;3661 }3662 3663 if (num_extents)3664 {3665 handle_extent_array->extent_count = num_extents;3666 handle_extent_array->extent_array = (PVFS_handle_extent *)3667 malloc(num_extents * sizeof(PVFS_handle_extent));3668 if (!handle_extent_array->extent_array)3669 {3670 gossip_err("Error: failed to alloc %d extents\n",3671 handle_extent_array->extent_count);3672 return -1;3673 }3674 memset(handle_extent_array->extent_array,0,3675 (num_extents * sizeof(PVFS_handle_extent)));3676 3677 /* reset opaque handle parsing state for next iteration */3678 status = 0;3679 3680 /* second pass, fill in the extent array */3681 while(PINT_parse_handle_ranges(handle_range_str,3682 &cur_extent, &status))3683 {3684 handle_extent_array->extent_array[i] = cur_extent;3685 i++;3686 }3687 }3688 }3689 return 0;3690 3432 } 3691 3433 -
branches/orange-next/src/io/job/job.c
r8934 r8935 3015 3015 */ 3016 3016 int job_trove_dspace_create(PVFS_fs_id coll_id, 3017 PVFS_handle_extent_array *handle_extent_array,3018 3017 PVFS_ds_type type, 3019 3018 void *hint, … … 3056 3055 #ifdef __PVFS2_TROVE_SUPPORT__ 3057 3056 ret = trove_dspace_create(coll_id, 3058 handle_extent_array,3059 3057 &(jd->u.trove.handle), 3060 3058 type, … … 3105 3103 */ 3106 3104 int job_trove_dspace_create_list(PVFS_fs_id coll_id, 3107 PVFS_handle_extent_array *handle_extent_array,3108 3105 PVFS_handle* out_handle_array, 3109 3106 int count, … … 3145 3142 #ifdef __PVFS2_TROVE_SUPPORT__ 3146 3143 ret = trove_dspace_create_list(coll_id, 3147 handle_extent_array,3148 3144 out_handle_array, 3149 3145 count, -
branches/orange-next/src/io/job/job.h
r8933 r8935 512 512 /* create a new data space object */ 513 513 int job_trove_dspace_create(PVFS_fs_id coll_id, 514 PVFS_handle_extent_array *handle_extent_array,515 514 PVFS_ds_type type, 516 515 void *hint, … … 525 524 /* create a set of new data space objects */ 526 525 int job_trove_dspace_create_list(PVFS_fs_id coll_id, 527 PVFS_handle_extent_array *handle_extent_array,528 526 PVFS_handle* out_handle_arry, 529 527 int count, -
branches/orange-next/src/io/trove/trove-dbpf/dbpf-dspace.c
r8933 r8935 109 109 110 110 static int dbpf_dspace_create(TROVE_coll_id coll_id, 111 TROVE_handle_extent_array *extent_array,112 111 TROVE_handle *handle_p, 113 112 TROVE_ds_type type, … … 137 136 if( handle_p == NULL ) 138 137 { 139 TROVE_handle_clear(handle);138 return -TROVE_EINVAL; 140 139 } 141 140 else … … 161 160 } 162 161 163 if (!extent_array || (extent_array->extent_count < 1))164 {165 return -TROVE_EINVAL;166 }167 168 162 event_type = trove_dbpf_dspace_create_event_id; 169 163 DBPF_EVENT_START(coll_p, q_op_p, event_type, &event_id, … … 173 167 PINT_HINT_GET_OP_ID(hints)); 174 168 175 /* this array is freed in dbpf-op.c:dbpf_queued_op_free, or176 * in dbpf_queue_or_service in the case of immediate completion */177 op_p->u.d_create.extent_array.extent_count =178 extent_array->extent_count;179 op_p->u.d_create.extent_array.extent_array =180 malloc(extent_array->extent_count * sizeof(TROVE_extent));181 169 op_p->hints = hints; 182 183 if (op_p->u.d_create.extent_array.extent_array == NULL)184 {185 return -TROVE_ENOMEM;186 }187 188 memcpy(op_p->u.d_create.extent_array.extent_array,189 extent_array->extent_array,190 extent_array->extent_count * sizeof(TROVE_extent));191 192 170 op_p->u.d_create.out_handle_p = handle_p; 193 171 op_p->u.d_create.type = type; … … 216 194 if ( TROVE_handle_is_null(new_handle) ) 217 195 { 218 gossip_err("%s: handle allocator returned a zerohandle.\n", __func__);196 gossip_err("%s: handle allocator returned a null handle.\n", __func__); 219 197 return(-TROVE_ENOSPC); 220 198 } … … 237 215 /* FIX: remove extent array */ 238 216 static int dbpf_dspace_create_list(TROVE_coll_id coll_id, 239 TROVE_handle_extent_array *extent_array,240 217 TROVE_handle *handle_array_p, 241 218 int count, … … 288 265 } 289 266 290 if (!extent_array || (extent_array->extent_count < 1))291 {292 return -TROVE_EINVAL;293 }294 295 267 event_type = trove_dbpf_dspace_create_event_id; 296 268 DBPF_EVENT_START(coll_p, q_op_p, event_type, &event_id, … … 299 271 PINT_HINT_GET_RANK(hints), 300 272 PINT_HINT_GET_OP_ID(hints)); 301 302 /* this array is freed in dbpf-op.c:dbpf_queued_op_free, or303 * in dbpf_queue_or_service in the case of immediate completion */304 op_p->u.d_create_list.extent_array.extent_count =305 extent_array->extent_count;306 op_p->u.d_create_list.extent_array.extent_array =307 malloc(extent_array->extent_count * sizeof(TROVE_extent));308 309 if (op_p->u.d_create_list.extent_array.extent_array == NULL)310 {311 return -TROVE_ENOMEM;312 }313 314 memcpy(op_p->u.d_create_list.extent_array.extent_array,315 extent_array->extent_array,316 extent_array->extent_count * sizeof(TROVE_extent));317 273 318 274 op_p->u.d_create_list.out_handle_array_p = handle_array_p; -
branches/orange-next/src/io/trove/trove-handle-mgmt/module.mk.in
r8929 r8935 1 1 DIR := src/io/trove/trove-handle-mgmt 2 2 SERVERSRC += 3 #SERVERSRC += \ 3 SERVERSRC += \ 4 $(DIR)/trove-handle-mgmt.c 4 5 # $(DIR)/avltree.c \ 5 6 # $(DIR)/trove-extentlist.c \ 6 7 # $(DIR)/trove-ledger.c \ 7 # $(DIR)/trove-handle-mgmt.c -
branches/orange-next/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c
r8934 r8935 13 13 #include "trove.h" 14 14 #include "quickhash.h" 15 #include "trove-ledger.h"16 15 #include "trove-handle-mgmt.h" 17 16 #include "gossip.h" … … 39 38 //static int hash_fsid_compare(void *key, struct qlist_head *link); 40 39 // 41 //static gen_mutex_t trove_handle_mutex = GEN_MUTEX_INITIALIZER;40 static gen_mutex_t trove_handle_mutex = GEN_MUTEX_INITIALIZER; 42 41 // 43 42 ///* trove_check_handle_ranges: … … 471 470 int trove_handle_mgmt_finalize() 472 471 { 473 int i;474 475 472 gen_mutex_lock(&trove_handle_mutex); 476 473 … … 480 477 return 0; 481 478 } 482 // 483 / //*484 //* Local variables:485 //* c-indent-level: 4486 //* c-basic-offset: 4487 //* End:488 //*489 //* vim: ts=8 sts=4 sw=4 expandtab490 //*/479 480 /* 481 * Local variables: 482 * c-indent-level: 4 483 * c-basic-offset: 4 484 * End: 485 * 486 * vim: ts=8 sts=4 sw=4 expandtab 487 */ -
branches/orange-next/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.h
r8934 r8935 1 / //*2 //* (C) 2001 Clemson University and The University of Chicago3 //*4 //* See COPYING in top-level directory.5 //*/6 // 7 //#ifndef __TROVE_HANDLE_MGMT_H8 //#define __TROVE_HANDLE_MGMT_H9 // 10 //#define MAX_NUM_VERIFY_HANDLE_COUNT 409611 // 12 //#define TROVE_DEFAULT_HANDLE_PURGATORY_SEC 36013 // 1 /* 2 * (C) 2001 Clemson University and The University of Chicago 3 * 4 * See COPYING in top-level directory. 5 */ 6 7 #ifndef __TROVE_HANDLE_MGMT_H 8 #define __TROVE_HANDLE_MGMT_H 9 10 #define MAX_NUM_VERIFY_HANDLE_COUNT 4096 11 12 #define TROVE_DEFAULT_HANDLE_PURGATORY_SEC 360 13 14 14 /* 15 15 # public methods. all methods return -1 on error; 0 on success unless … … 77 77 // uint64_t *free_count); 78 78 // 79 //#endif /* __TROVE_HANDLE_MGMT_H */80 // 81 / //*82 //* Local variables:83 //* c-indent-level: 484 //* c-basic-offset: 485 //* End:86 //*87 //* vim: ts=8 sts=4 sw=4 expandtab88 //*/79 #endif /* __TROVE_HANDLE_MGMT_H */ 80 81 /* 82 * Local variables: 83 * c-indent-level: 4 84 * c-basic-offset: 4 85 * End: 86 * 87 * vim: ts=8 sts=4 sw=4 expandtab 88 */ -
branches/orange-next/src/io/trove/trove-internal.h
r8934 r8935 257 257 int (*dspace_create)( 258 258 TROVE_coll_id coll_id, 259 TROVE_handle_extent_array *extent_array,260 259 TROVE_handle *handle, 261 260 TROVE_ds_type type, … … 269 268 int (*dspace_create_list)( 270 269 TROVE_coll_id coll_id, 271 TROVE_handle_extent_array *extent_array,272 270 TROVE_handle *handle_array, 273 271 int count, -
branches/orange-next/src/io/trove/trove.c
r8934 r8935 752 752 int trove_dspace_create_list( 753 753 TROVE_coll_id coll_id, 754 TROVE_handle_extent_array* handle_extent_array,755 754 TROVE_handle* out_handle_array, 756 755 int count, … … 773 772 return dspace_method_table[method_id]->dspace_create_list( 774 773 coll_id, 775 handle_extent_array,776 774 out_handle_array, 777 775 count, … … 789 787 int trove_dspace_create( 790 788 TROVE_coll_id coll_id, 791 TROVE_handle_extent_array* handle_extent_array,792 789 TROVE_handle* out_handle, 793 790 TROVE_ds_type type, … … 809 806 return dspace_method_table[method_id]->dspace_create( 810 807 coll_id, 811 handle_extent_array,812 808 out_handle, 813 809 type, -
branches/orange-next/src/io/trove/trove.h
r8934 r8935 388 388 389 389 int trove_dspace_create(TROVE_coll_id coll_id, 390 TROVE_handle_extent_array *handle_extent_array,391 390 TROVE_handle *out_handle, 392 391 TROVE_ds_type type, … … 396 395 TROVE_context_id context_id, 397 396 TROVE_op_id *out_op_id_p, 398 PVFS_hint hints);397 PVFS_hint hints); 399 398 400 399 int trove_dspace_create_list(TROVE_coll_id coll_id, 401 TROVE_handle_extent_array *handle_extent_array,402 400 TROVE_handle *out_handle_array, 403 401 int count, -
branches/orange-next/src/proto/pvfs2-req-proto.h
r8933 r8935 331 331 (PVFS_REQ_LIMIT_HANDLES_COUNT * sizeof(PVFS_handle)) 332 332 333 /* FIX: what to do about copying handle array ?*/ 333 334 #define PINT_SERVREQ_BATCH_REMOVE_FILL(__req, \ 334 335 __creds, \ … … 358 359 PVFS_fs_id, fs_id); 359 360 360 #define PINT_SERVREQ_MGMT_REMOVE_OBJECT_FILL(__req, \361 __creds, \362 __fsid, \363 __handle, \364 __hints) \365 do { \366 memset(&(__req), 0, sizeof(__req)); \367 (__req).op = PVFS_SERV_MGMT_REMOVE_OBJECT; \368 (__req).hints = (__hints); \369 (__req).credentials = (__creds); \370 (__req).u.mgmt_remove_object.fs_id = (__fsid); \371 (__req).u.mgmt_remove_object.handle = (__handle);\361 #define PINT_SERVREQ_MGMT_REMOVE_OBJECT_FILL(__req, \ 362 __creds, \ 363 __fsid, \ 364 __handle, \ 365 __hints) \ 366 do { \ 367 memset(&(__req), 0, sizeof(__req)); \ 368 (__req).op = PVFS_SERV_MGMT_REMOVE_OBJECT; \ 369 (__req).hints = (__hints); \ 370 (__req).credentials = (__creds); \ 371 (__req).u.mgmt_remove_object.fs_id = (__fsid); \ 372 PVFS_handle_copy((__req).u.mgmt_remove_object.handle, (__handle)); \ 372 373 } while (0) 373 374 … … 390 391 roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1) 391 392 392 #define PINT_SERVREQ_MGMT_REMOVE_DIRENT_FILL(__req, \393 __creds, \394 __fsid, \395 __handle, \396 __entry, \397 __hints) \398 do { \399 memset(&(__req), 0, sizeof(__req)); \400 (__req).op = PVFS_SERV_MGMT_REMOVE_DIRENT; \401 (__req).hints = (__hints); \402 (__req).credentials = (__creds); \403 (__req).u.mgmt_remove_dirent.fs_id = (__fsid); \404 (__req).u.mgmt_remove_dirent.handle = (__handle);\405 (__req).u.mgmt_remove_dirent.entry = (__entry); \393 #define PINT_SERVREQ_MGMT_REMOVE_DIRENT_FILL(__req, \ 394 __creds, \ 395 __fsid, \ 396 __handle, \ 397 __entry, \ 398 __hints) \ 399 do { \ 400 memset(&(__req), 0, sizeof(__req)); \ 401 (__req).op = PVFS_SERV_MGMT_REMOVE_DIRENT; \ 402 (__req).hints = (__hints); \ 403 (__req).credentials = (__creds); \ 404 (__req).u.mgmt_remove_dirent.fs_id = (__fsid); \ 405 PVFS_handle_copy((__req).u.mgmt_remove_dirent.handle, (__handle)); \ 406 (__req).u.mgmt_remove_dirent.entry = (__entry); \ 406 407 } while (0) 407 408 … … 420 421 (PVFS_REQ_LIMIT_HANDLES_COUNT * sizeof(PVFS_handle)) 421 422 422 #define PINT_SERVREQ_TREE_REMOVE_FILL(__req, \ 423 /* FIX: what to do about copying handle array ?*/ 424 #define PINT_SERVREQ_TREE_REMOVE_FILL(__req, \ 423 425 __creds, \ 424 426 __fsid, \ … … 453 455 #define extra_size_PVFS_servreq_tree_get_file_size \ 454 456 (PVFS_REQ_LIMIT_HANDLES_COUNT * sizeof(PVFS_handle)) 455 456 #define PINT_SERVREQ_TREE_GET_FILE_SIZE_FILL(__req, \ 457 __creds, \ 458 __fsid, \ 459 __caller_handle_index, \ 460 __num_data_files, \ 461 __handle_array, \ 462 __retry_msgpair_at_leaf, \ 463 __hints) \ 464 do { \ 465 memset(&(__req), 0, sizeof(__req)); \ 466 (__req).op = PVFS_SERV_TREE_GET_FILE_SIZE; \ 467 (__req).hints = (__hints); \ 468 (__req).credentials = (__creds); \ 469 (__req).u.tree_get_file_size.fs_id = (__fsid); \ 470 (__req).u.tree_get_file_size.caller_handle_index = (__caller_handle_index); \ 471 (__req).u.tree_get_file_size.num_data_files = (__num_data_files); \ 472 (__req).u.tree_get_file_size.handle_array = (__handle_array); \ 473 (__req).u.tree_get_file_size.retry_msgpair_at_leaf = (__retry_msgpair_at_leaf);\ 457 /* FIX: what to do about copying handle array ?*/ 458 #define PINT_SERVREQ_TREE_GET_FILE_SIZE_FILL(__req, \ 459 __creds, \ 460 __fsid, \ 461 __caller_handle_index, \ 462 __num_data_files, \ 463 __handle_array, \ 464 __retry_msgpair_at_leaf, \ 465 __hints) \ 466 do { \ 467 memset(&(__req), 0, sizeof(__req)); \ 468 (__req).op = PVFS_SERV_TREE_GET_FILE_SIZE; \ 469 (__req).hints = (__hints); \ 470 (__req).credentials = (__creds); \ 471 (__req).u.tree_get_file_size.fs_id = (__fsid); \ 472 (__req).u.tree_get_file_size.caller_handle_index = (__caller_handle_index);\ 473 (__req).u.tree_get_file_size.num_data_files = (__num_data_files); \ 474 (__req).u.tree_get_file_size.handle_array = (__handle_array); \ 475 (__req).u.tree_get_file_size.retry_msgpair_at_leaf = \ 476 (__retry_msgpair_at_leaf); \ 474 477 } while (0) 475 478 … … 503 506 PVFS_fs_id, fs_id); 504 507 505 #define PINT_SERVREQ_MGMT_GET_DIRDATA_HANDLE_FILL(__req, \506 __creds, \507 __fsid, \508 __handle, \509 __hints) \510 do { \511 memset(&(__req), 0, sizeof(__req)); \512 (__req).op = PVFS_SERV_MGMT_GET_DIRDATA_HANDLE; \513 (__req).credentials = (__creds); \514 (__req).hints = (__hints); \515 (__req).u.mgmt_get_dirdata_handle.fs_id = (__fsid); \516 (__req).u.mgmt_get_dirdata_handle.handle = (__handle); \508 #define PINT_SERVREQ_MGMT_GET_DIRDATA_HANDLE_FILL(__req, \ 509 __creds, \ 510 __fsid, \ 511 __handle, \ 512 __hints) \ 513 do { \ 514 memset(&(__req), 0, sizeof(__req)); \ 515 (__req).op = PVFS_SERV_MGMT_GET_DIRDATA_HANDLE; \ 516 (__req).credentials = (__creds); \ 517 (__req).hints = (__hints); \ 518 (__req).u.mgmt_get_dirdata_handle.fs_id = (__fsid); \ 519 PVFS_handle_copy((__req).u.mgmt_get_dirdata_handle.handle, (__handle)); \ 517 520 } while (0) 518 521 … … 539 542 int32_t, flags); 540 543 541 #define PINT_SERVREQ_FLUSH_FILL(__req, \542 __creds, \543 __fsid, \544 __handle, \545 __hints ) \546 do { \547 memset(&(__req), 0, sizeof(__req)); \548 (__req).op = PVFS_SERV_FLUSH; \549 (__req).credentials = (__creds); \550 (__req).hints = (__hints); \551 (__req).u.flush.fs_id = (__fsid); \552 (__req).u.flush.handle = (__handle);\544 #define PINT_SERVREQ_FLUSH_FILL(__req, \ 545 __creds, \ 546 __fsid, \ 547 __handle, \ 548 __hints ) \ 549 do { \ 550 memset(&(__req), 0, sizeof(__req)); \ 551 (__req).op = PVFS_SERV_FLUSH; \ 552 (__req).credentials = (__creds); \ 553 (__req).hints = (__hints); \ 554 (__req).u.flush.fs_id = (__fsid); \ 555 PVFS_handle_copy((__req).u.flush.handle, (__handle)); \ 553 556 } while (0) 554 557 … … 610 613 uint32_t, attrmask); 611 614 612 #define PINT_SERVREQ_UNSTUFF_FILL(__req, \613 __creds, \614 __fsid, \615 __handle, \616 __amask) \617 do { \618 memset(&(__req), 0, sizeof(__req)); \619 (__req).op = PVFS_SERV_UNSTUFF; \620 (__req).credentials = (__creds); \621 (__req).u.unstuff.fs_id = (__fsid); \622 (__req).u.unstuff.handle = (__handle);\623 (__req).u.unstuff.attrmask = (__amask); \615 #define PINT_SERVREQ_UNSTUFF_FILL(__req, \ 616 __creds, \ 617 __fsid, \ 618 __handle, \ 619 __amask) \ 620 do { \ 621 memset(&(__req), 0, sizeof(__req)); \ 622 (__req).op = PVFS_SERV_UNSTUFF; \ 623 (__req).credentials = (__creds); \ 624 (__req).u.unstuff.fs_id = (__fsid); \ 625 PVFS_handle_copy((__req).u.unstuff.handle, (__handle)); \ 626 (__req).u.unstuff.attrmask = (__amask); \ 624 627 } while (0) 625 628 … … 655 658 extra_size_PVFS_object_attr 656 659 657 #define PINT_SERVREQ_SETATTR_FILL(__req, \658 __creds, \659 __fsid, \660 __handle, \661 __objtype, \662 __attr, \663 __extra_amask, \664 __hints) \665 do { \666 memset(&(__req), 0, sizeof(__req)); \667 (__req).op = PVFS_SERV_SETATTR; \668 (__req).credentials = (__creds); \669 (__req).hints = (__hints); \670 (__req).u.setattr.fs_id = (__fsid); \671 (__req).u.setattr.handle = (__handle);\672 (__attr).objtype = (__objtype); \673 (__attr).mask |= PVFS_ATTR_SYS_TYPE; \674 PINT_CONVERT_ATTR(&(__req).u.setattr.attr, &(__attr), __extra_amask); \660 #define PINT_SERVREQ_SETATTR_FILL(__req, \ 661 __creds, \ 662 __fsid, \ 663 __handle, \ 664 __objtype, \ 665 __attr, \ 666 __extra_amask, \ 667 __hints) \ 668 do { \ 669 memset(&(__req), 0, sizeof(__req)); \ 670 (__req).op = PVFS_SERV_SETATTR; \ 671 (__req).credentials = (__creds); \ 672 (__req).hints = (__hints); \ 673 (__req).u.setattr.fs_id = (__fsid); \ 674 PVFS_handle_copy((__req).u.setattr.handle, (__handle)); \ 675 (__attr).objtype = (__objtype); \ 676 (__attr).mask |= PVFS_ATTR_SYS_TYPE; \ 677 PINT_CONVERT_ATTR(&(__req).u.setattr.attr, &(__attr), __extra_amask); \ 675 678 } while (0) 676 679 … … 696 699 roundup8(PVFS_REQ_LIMIT_PATH_NAME_BYTES + 1) 697 700 698 #define PINT_SERVREQ_LOOKUP_PATH_FILL(__req, \699 __creds, \700 __path, \701 __fsid, \702 __handle, \703 __amask, \704 __hints) \705 do { \706 memset(&(__req), 0, sizeof(__req)); \707 (__req).op = PVFS_SERV_LOOKUP_PATH; \708 (__req).credentials = (__creds); \709 (__req).hints = (__hints); \710 (__req).u.lookup_path.path = (__path); \711 (__req).u.lookup_path.fs_id = (__fsid); \712 (__req).u.lookup_path.handle = (__handle);\713 (__req).u.lookup_path.attrmask = (__amask); \701 #define PINT_SERVREQ_LOOKUP_PATH_FILL(__req, \ 702 __creds, \ 703 __path, \ 704 __fsid, \ 705 __handle, \ 706 __amask, \ 707 __hints) \ 708 do { \ 709 memset(&(__req), 0, sizeof(__req)); \ 710 (__req).op = PVFS_SERV_LOOKUP_PATH; \ 711 (__req).credentials = (__creds); \ 712 (__req).hints = (__hints); \ 713 (__req).u.lookup_path.path = (__path); \ 714 (__req).u.lookup_path.fs_id = (__fsid); \ 715 PVFS_handle_copy((__req).u.lookup_path.handle, (__handle)); \ 716 (__req).u.lookup_path.attrmask = (__amask); \ 714 717 } while (0) 715 718 … … 809 812 roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1) 810 813 811 #define PINT_SERVREQ_CRDIRENT_FILL(__req, \ 812 __creds, \ 813 __name, \ 814 __new_handle, \ 815 __handle, \ 816 __fs_id, \ 817 __hints) \ 818 do { \ 819 memset(&(__req), 0, sizeof(__req)); \ 820 (__req).op = PVFS_SERV_CRDIRENT; \ 821 (__req).credentials = (__creds); \ 822 (__req).hints = (__hints); \ 823 (__req).u.crdirent.name = (__name); \ 824 (__req).u.crdirent.new_handle = (__new_handle); \ 825 (__req).u.crdirent.handle = \ 826 (__handle); \ 827 (__req).u.crdirent.fs_id = (__fs_id); \ 814 #define PINT_SERVREQ_CRDIRENT_FILL(__req, \ 815 __creds, \ 816 __name, \ 817 __new_handle, \ 818 __handle, \ 819 __fs_id, \ 820 __hints) \ 821 do { \ 822 memset(&(__req), 0, sizeof(__req)); \ 823 (__req).op = PVFS_SERV_CRDIRENT; \ 824 (__req).credentials = (__creds); \ 825 (__req).hints = (__hints); \ 826 (__req).u.crdirent.name = (__name); \ 827 PVFS_handle_copy((__req).u.crdirent.new_handle, (__new_handle)); \ 828 PVFS_handle_copy((__req).u.crdirent.handle,(__handle)); \ 829 (__req).u.crdirent.fs_id = (__fs_id); \ 828 830 } while (0) 829 831 … … 845 847 roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1) 846 848 847 #define PINT_SERVREQ_RMDIRENT_FILL(__req, \848 __creds, \849 __fsid, \850 __handle, \851 __entry, \852 __hints) \853 do { \854 memset(&(__req), 0, sizeof(__req)); \855 (__req).op = PVFS_SERV_RMDIRENT; \856 (__req).credentials = (__creds); \857 (__req).hints = (__hints); \858 (__req).u.rmdirent.fs_id = (__fsid); \859 (__req).u.rmdirent.handle = (__handle);\860 (__req).u.rmdirent.entry = (__entry); \849 #define PINT_SERVREQ_RMDIRENT_FILL(__req, \ 850 __creds, \ 851 __fsid, \ 852 __handle, \ 853 __entry, \ 854 __hints) \ 855 do { \ 856 memset(&(__req), 0, sizeof(__req)); \ 857 (__req).op = PVFS_SERV_RMDIRENT; \ 858 (__req).credentials = (__creds); \ 859 (__req).hints = (__hints); \ 860 (__req).u.rmdirent.fs_id = (__fsid); \ 861 PVFS_handle_copy((__req).u.rmdirent.handle, (__handle)); \ 862 (__req).u.rmdirent.entry = (__entry); \ 861 863 } while (0); 862 864 … … 888 890 roundup8(PVFS_REQ_LIMIT_SEGMENT_BYTES+1) 889 891 890 #define PINT_SERVREQ_CHDIRENT_FILL(__req, \ 891 __creds, \ 892 __fsid, \ 893 __handle, \ 894 __new_dirent, \ 895 __entry, \ 896 __hints) \ 897 do { \ 898 memset(&(__req), 0, sizeof(__req)); \ 899 (__req).op = PVFS_SERV_CHDIRENT; \ 900 (__req).credentials = (__creds); \ 901 (__req).hints = (__hints); \ 902 (__req).u.chdirent.fs_id = (__fsid); \ 903 (__req).u.chdirent.handle = \ 904 (__handle); \ 905 (__req).u.chdirent.new_dirent_handle = \ 906 (__new_dirent); \ 907 (__req).u.chdirent.entry = (__entry); \ 892 #define PINT_SERVREQ_CHDIRENT_FILL(__req, \ 893 __creds, \ 894 __fsid, \ 895 __handle, \ 896 __new_dirent, \ 897 __entry, \ 898 __hints) \ 899 do { \ 900 memset(&(__req), 0, sizeof(__req)); \ 901 (__req).op = PVFS_SERV_CHDIRENT; \ 902 (__req).credentials = (__creds); \ 903 (__req).hints = (__hints); \ 904 (__req).u.chdirent.fs_id = (__fsid); \ 905 PVFS_handle_copy((__req).u.chdirent.handle, (__handle)); \ 906 PVFS_handle_copy((__req).u.chdirent.new_dirent_handle, (__new_dirent)); \ 907 (__req).u.chdirent.entry = (__entry); \ 908 908 } while (0); 909 909 … … 935 935 uint32_t, token_flag); 936 936 937 #define PINT_SERVREQ_READDIR_FILL(__req, \938 __creds, \939 __fsid, \940 __handle, \941 __token, \942 __token_flag, \943 __dirent_count, \944 __hints) \945 do { \946 memset(&(__req), 0, sizeof(__req)); \947 (__req).op = PVFS_SERV_READDIR; \948 (__req).credentials = (__creds); \949 (__req).hints = (__hints); \950 (__req).u.readdir.fs_id = (__fsid); \951 (__req).u.readdir.handle = (__handle);\952 memcpy( &( __req).u.readdir.token). &(__token),\953 sizeof(PVFS_kv_position) ;\954 (__req).u.readdir.token_flag = (__token_flag); \955 (__req).u.readdir.dirent_count = (__dirent_count); \937 #define PINT_SERVREQ_READDIR_FILL(__req, \ 938 __creds, \ 939 __fsid, \ 940 __handle, \ 941 __token, \ 942 __token_flag, \ 943 __dirent_count, \ 944 __hints) \ 945 do { \ 946 memset(&(__req), 0, sizeof(__req)); \ 947 (__req).op = PVFS_SERV_READDIR; \ 948 (__req).credentials = (__creds); \ 949 (__req).hints = (__hints); \ 950 (__req).u.readdir.fs_id = (__fsid); \ 951 PVFS_handle_copy((__req).u.readdir.handle, (__handle)); \ 952 memcpy( &((__req).u.readdir.token), &__token, \ 953 sizeof(PVFS_kv_position)); \ 954 (__req).u.readdir.token_flag = (__token_flag); \ 955 (__req).u.readdir.dirent_count = (__dirent_count); \ 956 956 } while (0); 957 957 … … 1128 1128 PVFS_size, size, 1129 1129 int32_t, flags); 1130 #define PINT_SERVREQ_TRUNCATE_FILL(__req, \1131 __creds, \1132 __fsid, \1133 __size, \1134 __handle, \1135 __hints) \1136 do { \1137 memset(&(__req), 0, sizeof(__req)); \1138 (__req).op = PVFS_SERV_TRUNCATE; \1139 (__req).credentials = (__creds); \1140 (__req).hints = (__hints); \1141 (__req).u.truncate.fs_id = (__fsid); \1142 (__req).u.truncate.size = (__size); \1143 (__req).u.truncate.handle = (__handle);\1130 #define PINT_SERVREQ_TRUNCATE_FILL(__req, \ 1131 __creds, \ 1132 __fsid, \ 1133 __size, \ 1134 __handle, \ 1135 __hints) \ 1136 do { \ 1137 memset(&(__req), 0, sizeof(__req)); \ 1138 (__req).op = PVFS_SERV_TRUNCATE; \ 1139 (__req).credentials = (__creds); \ 1140 (__req).hints = (__hints); \ 1141 (__req).u.truncate.fs_id = (__fsid); \ 1142 (__req).u.truncate.size = (__size); \ 1143 PVFS_handle_copy((__req).u.truncate.handle, (__handle)); \ 1144 1144 } while (0) 1145 1145 … … 1379 1379 (__req).hints = (__hints); \ 1380 1380 (__req).u.small_io.fs_id = (__fsid); \ 1381 (__req).u.small_io.handle = (__handle);\1381 PVFS_handle_copy((__req).u.small_io.handle, (__handle)); \ 1382 1382 (__req).u.small_io.io_type = (__io_type); \ 1383 1383 (__req).u.small_io.server_nr = (__dfile_nr); \ … … 1460 1460 #define extra_size_PVFS_servreq_listattr \ 1461 1461 (PVFS_REQ_LIMIT_LISTATTR * sizeof(PVFS_handle)) 1462 1462 /* FIX: how to handle array copying? */ 1463 1463 #define PINT_SERVREQ_LISTATTR_FILL(__req, \ 1464 1464 __creds, \ … … 1764 1764 * PVFS_REQ_LIMIT_EATTR_LIST)) 1765 1765 1766 #define PINT_SERVREQ_GETEATTR_FILL(__req, \1767 __creds, \1768 __fsid, \1769 __handle, \1770 __nkey, \1771 __key_array, \1772 __size_array, \1773 __hints) \1774 do { \1775 memset(&(__req), 0, sizeof(__req)); \1776 (__req).op = PVFS_SERV_GETEATTR; \1777 (__req).credentials = (__creds); \1778 (__req).hints = (__hints); \1779 (__req).u.geteattr.fs_id = (__fsid); \1780 (__req).u.geteattr.handle = (__handle);\1781 (__req).u.geteattr.nkey = (__nkey); \1782 (__req).u.geteattr.key = (__key_array); \1783 (__req).u.geteattr.valsz = (__size_array); \1766 #define PINT_SERVREQ_GETEATTR_FILL(__req, \ 1767 __creds, \ 1768 __fsid, \ 1769 __handle, \ 1770 __nkey, \ 1771 __key_array, \ 1772 __size_array, \ 1773 __hints) \ 1774 do { \ 1775 memset(&(__req), 0, sizeof(__req)); \ 1776 (__req).op = PVFS_SERV_GETEATTR; \ 1777 (__req).credentials = (__creds); \ 1778 (__req).hints = (__hints); \ 1779 (__req).u.geteattr.fs_id = (__fsid); \ 1780 PVFS_handle_copy((__req).u.geteattr.handle, (__handle)); \ 1781 (__req).u.geteattr.nkey = (__nkey); \ 1782 (__req).u.geteattr.key = (__key_array); \ 1783 (__req).u.geteattr.valsz = (__size_array); \ 1784 1784 } while (0) 1785 1785 … … 1825 1825 * PVFS_REQ_LIMIT_EATTR_LIST) 1826 1826 1827 #define PINT_SERVREQ_SETEATTR_FILL(__req, \1828 __creds, \1829 __fsid, \1830 __handle, \1831 __flags, \1832 __nkey, \1833 __key_array, \1834 __val_array, \1835 __hints) \1836 do { \1837 memset(&(__req), 0, sizeof(__req)); \1838 (__req).op = PVFS_SERV_SETEATTR; \1839 (__req).credentials = (__creds); \1840 (__req).hints = (__hints); \1841 (__req).u.seteattr.fs_id = (__fsid); \1842 (__req).u.seteattr.handle = (__handle);\1843 (__req).u.seteattr.flags = (__flags); \1844 (__req).u.seteattr.nkey = (__nkey); \1845 (__req).u.seteattr.key = (__key_array); \1846 (__req).u.seteattr.val = (__val_array); \1827 #define PINT_SERVREQ_SETEATTR_FILL(__req, \ 1828 __creds, \ 1829 __fsid, \ 1830 __handle, \ 1831 __flags, \ 1832 __nkey, \ 1833 __key_array, \ 1834 __val_array, \ 1835 __hints) \ 1836 do { \ 1837 memset(&(__req), 0, sizeof(__req)); \ 1838 (__req).op = PVFS_SERV_SETEATTR; \ 1839 (__req).credentials = (__creds); \ 1840 (__req).hints = (__hints); \ 1841 (__req).u.seteattr.fs_id = (__fsid); \ 1842 PVFS_handle_copy((__req).u.seteattr.handle, (__handle)); \ 1843 (__req).u.seteattr.flags = (__flags); \ 1844 (__req).u.seteattr.nkey = (__nkey); \ 1845 (__req).u.seteattr.key = (__key_array); \ 1846 (__req).u.seteattr.val = (__val_array); \ 1847 1847 } while (0) 1848 1848 … … 1864 1864 PVFS_REQ_LIMIT_EATTR_KEY_LEN 1865 1865 1866 #define PINT_SERVREQ_DELEATTR_FILL(__req, \1867 __creds, \1868 __fsid, \1869 __handle, \1870 __key, \1871 __hints) \1872 do { \1873 memset(&(__req), 0, sizeof(__req)); \1874 (__req).op = PVFS_SERV_DELEATTR; \1875 (__req).credentials = (__creds); \1876 (__req).hints = (__hints); \1877 (__req).u.deleattr.fs_id = (__fsid); \1878 (__req).u.deleattr.handle = (__handle);\1879 (__req).u.deleattr.key.buffer_sz = (__key).buffer_sz; \1880 (__req).u.deleattr.key.buffer = (__key).buffer; \1866 #define PINT_SERVREQ_DELEATTR_FILL(__req, \ 1867 __creds, \ 1868 __fsid, \ 1869 __handle, \ 1870 __key, \ 1871 __hints) \ 1872 do { \ 1873 memset(&(__req), 0, sizeof(__req)); \ 1874 (__req).op = PVFS_SERV_DELEATTR; \ 1875 (__req).credentials = (__creds); \ 1876 (__req).hints = (__hints); \ 1877 (__req).u.deleattr.fs_id = (__fsid); \ 1878 PVFS_handle_copy((__req).u.deleattr.handle, (__handle)); \ 1879 (__req).u.deleattr.key.buffer_sz = (__key).buffer_sz; \ 1880 (__req).u.deleattr.key.buffer = (__key).buffer; \ 1881 1881 } while (0) 1882 1882 … … 1905 1905 (PVFS_REQ_LIMIT_EATTR_LIST * sizeof(PVFS_size)) 1906 1906 1907 #define PINT_SERVREQ_LISTEATTR_FILL(__req, \1908 __creds, \1909 __fsid, \1910 __handle, \1911 __token, \1912 __token_flag, \1913 __nkey, \1914 __size_array, \1915 __hints) \1916 do { \1917 memset(&(__req), 0, sizeof(__req)); \1918 (__req).op = PVFS_SERV_LISTEATTR; \1919 (__req).credentials = (__creds); \1920 (__req).hints = (__hints); \1921 (__req).u.listeattr.fs_id = (__fsid); \1922 (__req).u.listeattr.handle = (__handle);\1923 memcpy( &(__req).u.listeattr.token, &(__token), \1924 sizeof(PVFS_kv_position)); \1925 (__req).u.listeattr.token_flag = (__token_flag); \1926 (__req).u.listeattr.nkey = (__nkey); \1927 (__req).u.listeattr.keysz = (__size_array); \1907 #define PINT_SERVREQ_LISTEATTR_FILL(__req, \ 1908 __creds, \ 1909 __fsid, \ 1910 __handle, \ 1911 __token, \ 1912 __token_flag, \ 1913 __nkey, \ 1914 __size_array, \ 1915 __hints) \ 1916 do { \ 1917 memset(&(__req), 0, sizeof(__req)); \ 1918 (__req).op = PVFS_SERV_LISTEATTR; \ 1919 (__req).credentials = (__creds); \ 1920 (__req).hints = (__hints); \ 1921 (__req).u.listeattr.fs_id = (__fsid); \ 1922 PVFS_handle_copy((__req).u.listeattr.handle, (__handle)); \ 1923 memcpy( &(__req).u.listeattr.token, &(__token), \ 1924 sizeof(PVFS_kv_position)); \ 1925 (__req).u.listeattr.token_flag = (__token_flag); \ 1926 (__req).u.listeattr.nkey = (__nkey); \ 1927 (__req).u.listeattr.keysz = (__size_array); \ 1928 1928 } while (0); 1929 1929 -
branches/orange-next/src/server/batch-create.sm
r7471 r8935 88 88 ret = job_trove_dspace_create_list( 89 89 s_op->req->u.batch_create.fs_id, 90 &s_op->req->u.batch_create.handle_extent_array,91 90 s_op->resp.u.batch_create.handle_array, 92 91 s_op->req->u.batch_create.object_count, -
branches/orange-next/src/server/create-immutable-copies.sm
r8929 r8935 915 915 /*create local datahandles - will be used as destination handles for copies*/ 916 916 ret = job_trove_dspace_create_list( imm_p->fs_id 917 ,&data_handle_ext_array918 917 ,imm_p->handle_array_copies_local 919 918 ,imm_p->handle_array_copies_local_count * -
branches/orange-next/src/server/create.sm
r8929 r8935 176 176 ret = job_trove_dspace_create( 177 177 s_op->req->u.create.fs_id, 178 &meta_handle_ext_array,179 178 PVFS_TYPE_METAFILE, 180 179 NULL, … … 384 383 ret = job_trove_dspace_create_list( 385 384 s_op->req->u.create.fs_id, 386 &data_handle_ext_array,387 385 s_op->u.create.handle_array_local, 388 386 s_op->u.create.handle_array_local_count, -
branches/orange-next/src/server/mkdir.sm
r8929 r8935 121 121 122 122 ret = job_trove_dspace_create( 123 s_op->u.mkdir.fs_id, &s_op->u.mkdir.handle_extent_array,123 s_op->u.mkdir.fs_id, 124 124 PVFS_TYPE_DIRECTORY, NULL, 125 125 TROVE_SYNC, … … 177 177 int ret = -PVFS_ENOMEM; 178 178 job_id_t i; 179 PVFS_handle_extent_array extent_array;180 struct server_configuration_s *user_opts = get_server_config_struct();181 179 182 180 gossip_debug(GOSSIP_MKDIR_DEBUG, " creating dspace on coll_id %d\n", 183 181 s_op->u.mkdir.fs_id); 184 182 185 /* find our meta handle range for this create */186 ret = PINT_config_get_meta_handle_extent_array(187 user_opts, s_op->u.mkdir.fs_id, &extent_array);188 assert(ret == 0);189 assert(extent_array.extent_count > 0);190 191 gossip_debug(GOSSIP_MKDIR_DEBUG, " dirdata handle will "192 "be in starting hrange[0] %llu-%llu\n",193 llu(extent_array.extent_array[0].first),194 llu(extent_array.extent_array[0].last));195 196 183 ret = job_trove_dspace_create( 197 s_op->u.mkdir.fs_id, &extent_array,PVFS_TYPE_DIRDATA, NULL,184 s_op->u.mkdir.fs_id, PVFS_TYPE_DIRDATA, NULL, 198 185 TROVE_SYNC, 199 186 smcb, 0, js_p, &i, 200 187 server_job_context, s_op->req->hints); 201 202 free(extent_array.extent_array);203 extent_array.extent_array = NULL;204 188 205 189 return ret; -
branches/orange-next/src/server/pvfs2-server.c
r8920 r8935 2623 2623 2624 2624 /* create a trove object for the pool */ 2625 ret = job_trove_dspace_create(fsid, &ext_array,PVFS_TYPE_INTERNAL,2625 ret = job_trove_dspace_create(fsid, PVFS_TYPE_INTERNAL, 2626 2626 NULL, TROVE_SYNC, NULL, 0, &js, &job_id, server_job_context, NULL); 2627 2627 while(ret == 0)
