Changeset 8960
- Timestamp:
- 07/15/11 23:22:50 (23 months ago)
- Location:
- branches/orange-next
- Files:
-
- 23 modified
-
include/pvfs2-mgmt.h (modified) (3 diffs)
-
src/apps/admin/pvfs2-check-config.c (modified) (2 diffs)
-
src/apps/admin/pvfs2-fs-dump.c (modified) (4 diffs)
-
src/apps/admin/pvfs2-fsck.c (modified) (2 diffs)
-
src/apps/admin/pvfs2-migrate-collection.c (modified) (2 diffs)
-
src/apps/admin/pvfs2-mkspace.c (modified) (1 diff)
-
src/apps/admin/pvfs2-perf-mon-example.c (modified) (14 diffs)
-
src/apps/admin/pvfs2-ping.c (modified) (9 diffs)
-
src/apps/karma/comm.c (modified) (6 diffs)
-
src/client/sysint/fs-add.sm (modified) (5 diffs)
-
src/client/sysint/mgmt-get-config.c (modified) (2 diffs)
-
src/client/sysint/mgmt-misc.c (modified) (8 diffs)
-
src/client/sysint/mgmt-statfs-list.sm (modified) (1 diff)
-
src/client/sysint/sys-create.sm (modified) (4 diffs)
-
src/client/sysint/sys-mkdir.sm (modified) (3 diffs)
-
src/client/sysint/sys-statfs.sm (modified) (2 diffs)
-
src/client/sysint/sys-symlink.sm (modified) (3 diffs)
-
src/common/misc/fsck-utils.c (modified) (8 diffs)
-
src/common/misc/pint-cached-config.c (modified) (1 diff)
-
src/common/misc/server-config.c (modified) (3 diffs)
-
src/common/misc/server-config.h (modified) (4 diffs)
-
src/server/create.sm (modified) (3 diffs)
-
src/server/unstuff.sm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/orange-next/include/pvfs2-mgmt.h
r8935 r8960 121 121 PVFS_fs_id fs_id, 122 122 PVFS_credentials *credentials, 123 int server_type,124 123 int *count); 125 124 … … 127 126 PVFS_fs_id fs_id, 128 127 PVFS_credentials *credentials, 129 int server_type,130 128 PVFS_BMI_addr_t *addr_array, 131 129 int *inout_count_p); … … 148 146 PVFS_fs_id fs_id, 149 147 PVFS_credentials *credentials, 150 PVFS_BMI_addr_t addr, 151 int* server_type); 148 PVFS_BMI_addr_t addr); 152 149 153 150 PVFS_error PVFS_imgmt_setparam_list( -
branches/orange-next/src/apps/admin/pvfs2-check-config.c
r4574 r8960 158 158 fs_id = mnt->mntent_array[i].fs_id; 159 159 160 /* Retrieve the list of all servers for the fs id*/ 161 rc = PVFS_mgmt_count_servers(fs_id, &creds, PVFS_MGMT_IO_SERVER, 162 &server_count); 160 /* Retrieve the list of all servers for the fs id */ 161 rc = PVFS_mgmt_count_servers(fs_id, &creds, &server_count); 163 162 164 163 if (0 != rc) … … 168 167 } 169 168 server_addrs = malloc(server_count * sizeof(PVFS_BMI_addr_t)); 170 rc = PVFS_mgmt_get_server_array(fs_id, &creds, PVFS_MGMT_IO_SERVER,169 rc = PVFS_mgmt_get_server_array(fs_id, &creds, 171 170 server_addrs, &server_count); 172 171 if (0 != rc) -
branches/orange-next/src/apps/admin/pvfs2-fs-dump.c
r8943 r8960 142 142 143 143 /* count how many servers we have */ 144 ret = PVFS_mgmt_count_servers(cur_fs, &creds, 145 PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 146 &server_count); 144 ret = PVFS_mgmt_count_servers(cur_fs, &creds, &server_count); 147 145 if (ret != 0) 148 146 { … … 159 157 return -1; 160 158 } 161 ret = PVFS_mgmt_get_server_array(cur_fs, &creds, 162 PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 163 addr_array, &server_count); 159 ret = PVFS_mgmt_get_server_array(cur_fs, &creds, addr_array, &server_count); 164 160 if (ret != 0) 165 161 { … … 656 652 { 657 653 PVFS_handle handle; 658 int server_idx, tmp_type,flag = 1;654 int server_idx, flag = 1; 659 655 660 656 if (!dot_fmt) { … … 700 696 PVFS_mgmt_map_addr(cur_fs, 701 697 creds, 702 addr_array[server_idx], 703 &tmp_type), 698 addr_array[server_idx]), 704 699 llu(handle)); 705 700 } -
branches/orange-next/src/apps/admin/pvfs2-fsck.c
r8943 r8960 88 88 /* count how many servers we have */ 89 89 ret = PVFS_mgmt_count_servers(cur_fs, &creds, 90 PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER,91 90 &server_count); 92 91 if (ret != 0) … … 106 105 ret = PVFS_mgmt_get_server_array(cur_fs, 107 106 &creds, 108 PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER,109 107 addr_array, 110 108 &server_count); -
branches/orange-next/src/apps/admin/pvfs2-migrate-collection.c
r8943 r8960 689 689 * will create 690 690 */ 691 char handle_range[] = "4-64000000000";692 691 TROVE_op_id op_id; 693 692 TROVE_context_id trove_context = -1; … … 736 735 coll_id, 737 736 handle, 738 handle_range,739 NULL,740 737 1, 741 738 0); -
branches/orange-next/src/apps/admin/pvfs2-mkspace.c
r8943 r8960 337 337 ret = pvfs2_mkspace(opts.data_space, opts.meta_space, 338 338 opts.collection, opts.coll_id, 339 opts.root_handle, opts.meta_ranges, 340 opts.data_ranges, opts.collection_only, 339 opts.root_handle, opts.collection_only, 341 340 opts.verbose); 342 341 } -
branches/orange-next/src/apps/admin/pvfs2-perf-mon-example.c
r8891 r8960 58 58 int i,j; 59 59 PVFS_credentials creds; 60 int io_server_count;60 int server_count; 61 61 int64_t** perf_matrix; 62 62 uint64_t* end_time_ms_array; 63 63 uint32_t* next_id_array; 64 64 PVFS_BMI_addr_t *addr_array; 65 int tmp_type;66 65 uint64_t next_time; 67 66 float bw; … … 84 83 85 84 /* translate local path into pvfs2 relative path */ 86 ret = PVFS_util_resolve(user_opts->mnt_point, 87 &cur_fs, pvfs_path,PVFS_NAME_MAX);85 ret = PVFS_util_resolve(user_opts->mnt_point, &cur_fs, pvfs_path, 86 PVFS_NAME_MAX); 88 87 if(ret < 0) 89 88 { … … 94 93 PVFS_util_gen_credentials(&creds); 95 94 96 /* count how many I/O servers we have */ 97 ret = PVFS_mgmt_count_servers(cur_fs, &creds, PVFS_MGMT_IO_SERVER, 98 &io_server_count); 95 /* count how many servers we have */ 96 ret = PVFS_mgmt_count_servers(cur_fs, &creds, &server_count); 99 97 if(ret < 0) 100 98 { … … 104 102 105 103 /* allocate a 2 dimensional array for statistics */ 106 perf_matrix = (int64_t **)malloc( io_server_count*sizeof(int64_t *));104 perf_matrix = (int64_t **)malloc(server_count*sizeof(int64_t *)); 107 105 if(!perf_matrix) 108 106 { … … 110 108 return(-1); 111 109 } 112 for(i=0; i< io_server_count; i++)110 for(i=0; i<server_count; i++) 113 111 { 114 112 perf_matrix[i] = (int64_t *)malloc(HISTORY * sizeof(int64_t)); … … 123 121 * we need from each server 124 122 */ 125 next_id_array = (uint32_t *) malloc( io_server_count * sizeof(uint32_t));123 next_id_array = (uint32_t *) malloc(server_count * sizeof(uint32_t)); 126 124 if (next_id_array == NULL) 127 125 { … … 129 127 return -1; 130 128 } 131 memset(next_id_array, 0, io_server_count*sizeof(uint32_t));129 memset(next_id_array, 0, server_count*sizeof(uint32_t)); 132 130 133 131 /* allocate an array to keep up with end times from each server */ 134 end_time_ms_array = (uint64_t *)malloc( io_server_count * sizeof(uint64_t));132 end_time_ms_array = (uint64_t *)malloc(server_count * sizeof(uint64_t)); 135 133 if (end_time_ms_array == NULL) 136 134 { … … 141 139 /* build a list of servers to talk to */ 142 140 addr_array = (PVFS_BMI_addr_t *) 143 malloc( io_server_count * sizeof(PVFS_BMI_addr_t));141 malloc(server_count * sizeof(PVFS_BMI_addr_t)); 144 142 if (addr_array == NULL) 145 143 { … … 149 147 ret = PVFS_mgmt_get_server_array(cur_fs, 150 148 &creds, 151 PVFS_MGMT_IO_SERVER,152 149 addr_array, 153 & io_server_count);150 &server_count); 154 151 if (ret < 0) 155 152 { … … 168 165 addr_array, 169 166 next_id_array, 170 io_server_count,167 server_count, 171 168 &key_cnt, 172 169 HISTORY, … … 180 177 printf("\nPVFS2 I/O server bandwith statistics (MB/sec):\n"); 181 178 printf("==================================================\n"); 182 for (i=0; i < io_server_count; i++)179 for (i=0; i < server_count; i++) 183 180 { 184 181 printf("\nread: %-30s ", 185 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i] , &tmp_type));182 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i])); 186 183 for (j=0; j < HISTORY; j++) 187 184 { … … 211 208 212 209 printf("\nwrite: %-30s ", 213 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i] , &tmp_type));210 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i])); 214 211 215 212 for (j=0; j < HISTORY; j++) … … 242 239 printf("=================================================="); 243 240 printf("\nread: %-30s ", 244 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i] , &tmp_type));241 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i])); 245 242 246 243 for(j = 0; j < HISTORY; j++) … … 254 251 255 252 printf("\nwrite: %-30s ", 256 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i] , &tmp_type));253 PVFS_mgmt_map_addr(cur_fs, &creds,addr_array[i])); 257 254 258 255 for(j = 0; j < HISTORY; j++) -
branches/orange-next/src/apps/admin/pvfs2-ping.c
r8943 r8960 156 156 157 157 ret = PVFS_mgmt_count_servers( 158 cur_fs, &creds, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER,&count);158 cur_fs, &creds, &count); 159 159 if (ret < 0) 160 160 { … … 270 270 PVFS_BMI_addr_t* addr_array; 271 271 int i; 272 int tmp;273 272 274 273 PVFS_util_gen_credentials(&creds); 275 274 276 printf("\n meta servers:\n"); 277 ret = PVFS_mgmt_count_servers( 278 fsid, &creds, PVFS_MGMT_META_SERVER, &count); 275 printf("\n servers:\n"); 276 ret = PVFS_mgmt_count_servers( fsid, &creds, &count); 279 277 if (ret < 0) 280 278 { … … 291 289 292 290 ret = PVFS_mgmt_get_server_array( 293 fsid, &creds, PVFS_MGMT_META_SERVER,addr_array, &count);291 fsid, &creds, addr_array, &count); 294 292 if (ret < 0) 295 293 { … … 301 299 { 302 300 printf(" %s ", 303 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i] , &tmp));301 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i])); 304 302 ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i], NULL); 305 303 if (ret == 0) … … 310 308 { 311 309 printf("FAILURE: PVFS_mgmt_noop failed for server: %s\n", 312 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); 313 return ret; 314 } 315 } 316 free(addr_array); 317 318 printf("\n data servers:\n"); 319 ret = PVFS_mgmt_count_servers( 320 fsid, &creds, PVFS_MGMT_IO_SERVER, &count); 321 if (ret < 0) 322 { 323 PVFS_perror("PVFS_mgmt_count_servers()", ret); 324 return ret; 325 } 326 addr_array = (PVFS_BMI_addr_t *)malloc( 327 count * sizeof(PVFS_BMI_addr_t)); 328 if (addr_array == NULL) 329 { 330 perror("malloc"); 331 return -PVFS_ENOMEM; 332 } 333 334 ret = PVFS_mgmt_get_server_array( 335 fsid, &creds, PVFS_MGMT_IO_SERVER, addr_array, &count); 336 if (ret < 0) 337 { 338 PVFS_perror("PVFS_mgmt_get_server_array()", ret); 339 return ret; 340 } 341 342 for (i = 0; i < count; i++) 343 { 344 printf(" %s ", 345 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); 346 ret = PVFS_mgmt_noop(fsid, &creds, addr_array[i], NULL); 347 if (ret == 0) 348 { 349 printf("Ok\n"); 350 } 351 else 352 { 353 printf("Failure!\n"); 310 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i])); 354 311 return ret; 355 312 } … … 371 328 int i; 372 329 int ret = -1; 373 int tmp;374 330 int count; 375 331 PVFS_BMI_addr_t *addr_array; … … 377 333 PVFS_util_gen_credentials(&creds); 378 334 379 printf("\n meta servers:\n"); 380 ret = PVFS_mgmt_count_servers( 381 fsid, &creds, PVFS_MGMT_META_SERVER, &count); 335 printf("\n servers:\n"); 336 ret = PVFS_mgmt_count_servers( fsid, &creds, &count); 382 337 if (ret < 0) 383 338 { … … 393 348 } 394 349 395 ret = PVFS_mgmt_get_server_array( 396 fsid, &creds, PVFS_MGMT_META_SERVER, addr_array, &count); 350 ret = PVFS_mgmt_get_server_array( fsid, &creds, addr_array, &count); 397 351 if (ret < 0) 398 352 { … … 403 357 for (i=0; i<count; i++) 404 358 { 405 printf(" %s\n", 406 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); 407 } 408 free(addr_array); 409 410 printf("\n data servers:\n"); 411 ret = PVFS_mgmt_count_servers( 412 fsid, &creds, PVFS_MGMT_IO_SERVER, &count); 413 if (ret < 0) 414 { 415 PVFS_perror("PVFS_mgmt_count_servers()", ret); 416 return ret; 417 } 418 addr_array = (PVFS_BMI_addr_t *)malloc( 419 count * sizeof(PVFS_BMI_addr_t)); 420 if (addr_array == NULL) 421 { 422 perror("malloc"); 423 return -PVFS_ENOMEM; 424 } 425 426 ret = PVFS_mgmt_get_server_array( 427 fsid, &creds, PVFS_MGMT_IO_SERVER, addr_array, &count); 428 if (ret < 0) 429 { 430 PVFS_perror("PVFS_mgmt_get_server_array()", ret); 431 return ret; 432 } 433 434 for(i=0; i<count; i++) 435 { 436 printf(" %s\n", 437 PVFS_mgmt_map_addr(fsid, &creds, addr_array[i], &tmp)); 359 printf(" %s\n", PVFS_mgmt_map_addr(fsid, &creds, addr_array[i])); 438 360 } 439 361 free(addr_array); -
branches/orange-next/src/apps/karma/comm.c
r8891 r8960 235 235 ret = PVFS_mgmt_count_servers(cur_fsid, 236 236 &creds, 237 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,238 237 &outcount); 239 238 if (ret < 0) … … 275 274 ret = PVFS_mgmt_get_server_array(cur_fsid, 276 275 &creds, 277 PVFS_MGMT_IO_SERVER | 278 PVFS_MGMT_META_SERVER, internal_addrs, 276 internal_addrs, 279 277 &outcount); 280 278 if (ret < 0) … … 375 373 for (i = 0; i < internal_details->count_used; i++) 376 374 { 377 int dummy;378 379 375 PVFS_strerror_r(internal_details->error[i].error, err_msg, 64); 380 376 snprintf(msgbuf, … … 383 379 PVFS_mgmt_map_addr(cur_fsid, 384 380 &creds, 385 internal_details->error[i].addr, 386 &dummy), 381 internal_details->error[i].addr), 387 382 err_msg); 388 383 gui_message_new(msgbuf); … … 468 463 for (i = 0; i < internal_details->count_used; i++) 469 464 { 470 int dummy;471 472 465 PVFS_strerror_r(internal_details->error[i].error, err_msg, 64); 473 466 snprintf(msgbuf, … … 476 469 PVFS_mgmt_map_addr(cur_fsid, 477 470 &creds, 478 internal_details->error[i].addr, 479 &dummy), 471 internal_details->error[i].addr), 480 472 err_msg); 481 473 gui_message_new(msgbuf); -
branches/orange-next/src/client/sysint/fs-add.sm
r8935 r8960 286 286 assert(js_p->error_code == 0); 287 287 fsid = sm_p->u.get_config.mntent->fs_id; 288 ret = PVFS_mgmt_count_servers( 289 fsid, sm_p->cred_p, PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER, &count); 288 ret = PVFS_mgmt_count_servers( fsid, sm_p->cred_p, &count ); 290 289 if (ret < 0) 291 290 { … … 309 308 310 309 ret = PVFS_mgmt_get_server_array(fsid, sm_p->cred_p, 311 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,sm_p->fetch_config.addr_array, &count);310 sm_p->fetch_config.addr_array, &count); 312 311 if (ret < 0) 313 312 { … … 392 391 static int compare_hashes(PINT_client_sm *sm_p, job_status_s *js_p) 393 392 { 394 int i, count, ret = 0, fs_conf_failed = 0, fs_conf_size_mismatch = 0 , tmp;393 int i, count, ret = 0, fs_conf_failed = 0, fs_conf_size_mismatch = 0; 395 394 char **sha1_fs_digests = NULL; 396 395 size_t digest_len; … … 427 426 gossip_err(" FS config file on %s -> (size) %d\n", 428 427 PVFS_mgmt_map_addr(fsid, sm_p->cred_p, 429 sm_p->fetch_config.addr_array[indexes[i]] , &tmp),428 sm_p->fetch_config.addr_array[indexes[i]]), 430 429 sm_p->fetch_config.fs_config_buf_size[indexes[i]] - 1); 431 430 ret = -PVFS_EINVAL; … … 459 458 gossip_err(" FS config file on %s -> (SHA1) %s\n", 460 459 PVFS_mgmt_map_addr(fsid, sm_p->cred_p, 461 sm_p->fetch_config.addr_array[indexes[i]] , &tmp), str);460 sm_p->fetch_config.addr_array[indexes[i]]), str); 462 461 } 463 462 ret = -PVFS_EINVAL; -
branches/orange-next/src/client/sysint/mgmt-get-config.c
r6984 r8960 42 42 struct server_configuration_s *config = NULL; 43 43 struct PVFS_sys_mntent mntent; 44 int server_type = 0;45 44 46 45 gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_mgmt_get_config entered\n"); … … 69 68 70 69 mntent.the_pvfs_config_server = 71 (char*)PINT_cached_config_map_addr(*fsid, *addr , &server_type);70 (char*)PINT_cached_config_map_addr(*fsid, *addr); 72 71 73 72 PINT_put_server_config_struct(config); -
branches/orange-next/src/client/sysint/mgmt-misc.c
r7471 r8960 32 32 PVFS_fs_id fs_id, 33 33 PVFS_credentials *credentials, 34 PVFS_BMI_addr_t addr, 35 int *server_type) 36 { 37 return PINT_cached_config_map_addr(fs_id, addr, server_type); 34 PVFS_BMI_addr_t addr) 35 { 36 return PINT_cached_config_map_addr(fs_id, addr); 38 37 } 39 38 … … 63 62 int real_count = 0; 64 63 65 ret = PINT_cached_config_count_servers( 66 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 67 &real_count); 64 ret = PINT_cached_config_count_servers(fs_id, &real_count); 68 65 69 66 if (ret < 0) … … 87 84 88 85 /* generate default list of servers */ 89 ret = PINT_cached_config_get_server_array( 90 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 91 addr_array, &real_count); 86 ret = PINT_cached_config_get_server_array(fs_id, addr_array, &real_count); 92 87 93 88 if (ret < 0) … … 122 117 PVFS_error ret = -PVFS_EINVAL; 123 118 PVFS_BMI_addr_t *addr_array = NULL; 124 ret = PINT_cached_config_count_servers( 125 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, &count); 119 ret = PINT_cached_config_count_servers(fs_id, &count); 126 120 127 121 if (ret < 0) … … 138 132 139 133 /* generate default list of servers */ 140 ret = PINT_cached_config_get_server_array( 141 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 142 addr_array, &count); 143 134 ret = PINT_cached_config_get_server_array(fs_id, addr_array, &count); 144 135 if (ret < 0) 145 136 { … … 188 179 PVFS_fs_id fs_id, 189 180 PVFS_credentials *credentials, 190 int server_type,191 181 PVFS_BMI_addr_t *addr_array, 192 182 int *inout_count_p) … … 194 184 PVFS_error ret = -PVFS_EINVAL; 195 185 196 ret = PINT_cached_config_get_server_array( 197 fs_id, server_type, addr_array, inout_count_p); 186 ret = PINT_cached_config_get_server_array(fs_id, addr_array, inout_count_p); 198 187 return ret; 199 188 } … … 209 198 PVFS_fs_id fs_id, 210 199 PVFS_credentials *credentials, 211 int server_type,212 200 int *count) 213 201 { 214 202 PVFS_error ret = -PVFS_EINVAL; 215 203 216 ret = PINT_cached_config_count_servers(fs_id, server_type,count);204 ret = PINT_cached_config_count_servers(fs_id, count); 217 205 return ret; 218 206 } -
branches/orange-next/src/client/sysint/mgmt-statfs-list.sm
r8935 r8960 278 278 sm_stat->bmi_address = PVFS_mgmt_map_addr( 279 279 sm_p->u.statfs_list.fs_id, sm_p->cred_p, 280 sm_p->msgarray_op.msgarray[i].svr_addr , &sm_stat->server_type);280 sm_p->msgarray_op.msgarray[i].svr_addr); 281 281 assert(sm_stat->bmi_address); 282 282 -
branches/orange-next/src/client/sysint/sys-create.sm
r8935 r8960 414 414 struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); 415 415 int ret = -PVFS_EINVAL; 416 PVFS_handle_extent_array meta_handle_extent_array;417 416 PINT_sm_msgpair_state *msg_p = NULL; 418 int server_type;419 417 420 418 gossip_debug(GOSSIP_CLIENT_DEBUG, "create state: " … … 438 436 msg_p = &sm_p->msgarray_op.msgpair; 439 437 440 ret = PINT_cached_config_get_next_ meta(441 sm_p->object_ref.fs_id, &msg_p->svr_addr , &meta_handle_extent_array);438 ret = PINT_cached_config_get_next_server( 439 sm_p->object_ref.fs_id, &msg_p->svr_addr); 442 440 if(ret != 0) 443 441 { … … 453 451 "PVFS_isys_create() selected meta server: %s\n", 454 452 PINT_cached_config_map_addr(sm_p->object_ref.fs_id, 455 msg_p->svr_addr, 456 &server_type)); 453 msg_p->svr_addr)); 457 454 } 458 455 … … 467 464 468 465 msg_p->fs_id = sm_p->object_ref.fs_id; 469 PVFS_handle_copy(msg_p->handle, 470 meta_handle_extent_array.extent_array[0].first); 466 467 /* FIX: what handle do we put here, used to come from the 468 * meta_handle_extent_array */ 469 /* PVFS_handle_copy(msg_p->handle, 470 meta_handle_extent_array.extent_array[0].first); 471 */ 471 472 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 472 473 msg_p->comp_fn = create_comp_fn; -
branches/orange-next/src/client/sysint/sys-mkdir.sm
r8935 r8960 343 343 struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); 344 344 int ret = -PVFS_EINVAL; 345 PVFS_handle_extent_array meta_handle_extent_array;346 345 PINT_sm_msgpair_state *msg_p = NULL; 347 346 … … 356 355 msg_p = &sm_p->msgarray_op.msgpair; 357 356 358 ret = PINT_cached_config_get_next_meta( 357 /* FIX: used to get extent array here */ 358 ret = PINT_cached_config_get_next_server( 359 359 sm_p->object_ref.fs_id, 360 &msg_p->svr_addr , &meta_handle_extent_array);360 &msg_p->svr_addr); 361 361 362 362 if (ret) … … 371 371 *sm_p->cred_p, 372 372 sm_p->object_ref.fs_id, 373 meta_handle_extent_array,374 373 sm_p->u.mkdir.sys_attr, 375 374 sm_p->hints); 376 375 377 376 msg_p->fs_id = sm_p->object_ref.fs_id; 377 /* FIX: used to copy handle from extent_array */ 378 /* 378 379 PVFS_handle_copy(msg_p->handle, 379 380 meta_handle_extent_array.extent_array[0].first); 381 */ 380 382 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 381 383 msg_p->comp_fn = mkdir_msg_comp_fn; -
branches/orange-next/src/client/sysint/sys-statfs.sm
r7471 r8960 76 76 77 77 /* count the number of servers */ 78 ret = PINT_cached_config_count_servers( 79 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 80 &sm_p->u.statfs_list.count); 78 ret = PINT_cached_config_count_servers( fs_id, &sm_p->u.statfs_list.count); 81 79 if (ret < 0) 82 80 { … … 105 103 /* generate default list of servers */ 106 104 ret = PINT_cached_config_get_server_array( 107 fs_id, PVFS_MGMT_IO_SERVER|PVFS_MGMT_META_SERVER, 108 sm_p->u.statfs_list.addr_array, &sm_p->u.statfs_list.count); 105 fs_id, sm_p->u.statfs_list.addr_array, &sm_p->u.statfs_list.count); 109 106 if (ret < 0) 110 107 { -
branches/orange-next/src/client/sysint/sys-symlink.sm
r8935 r8960 364 364 struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); 365 365 int ret = -PVFS_EINVAL; 366 PVFS_handle_extent_array meta_handle_extent_array;367 366 PINT_sm_msgpair_state *msg_p = NULL; 368 367 … … 374 373 msg_p = &sm_p->msgarray_op.msgpair; 375 374 376 ret = PINT_cached_config_get_next_ meta(375 ret = PINT_cached_config_get_next_server( 377 376 sm_p->object_ref.fs_id, 378 &msg_p->svr_addr , &meta_handle_extent_array);377 &msg_p->svr_addr); 379 378 380 379 if (ret) … … 391 390 PVFS_TYPE_SYMLINK, 392 391 1, 393 meta_handle_extent_array,394 392 sm_p->hints); 395 393 396 394 msg_p->fs_id = sm_p->object_ref.fs_id; 395 /* FIX: what do we copy to the handle here, used to be extent_array */ 396 /* 397 397 PVFS_handle_copy(msg_p->handle, 398 398 meta_handle_extent_array.extent_array[0].first); 399 */ 399 400 msg_p->retry_flag = PVFS_MSGPAIR_NO_RETRY; 400 401 msg_p->comp_fn = symlink_create_comp_fn; -
branches/orange-next/src/common/misc/fsck-utils.c
r8935 r8960 130 130 int num_servers = 0; 131 131 int i = 0; 132 int server_type = 0;133 132 PVFS_BMI_addr_t *addresses = NULL; 134 133 char *fs_config = NULL; … … 147 146 ret = PVFS_mgmt_count_servers(*cur_fs, 148 147 (PVFS_credentials *) creds, 149 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,150 148 &num_servers); 151 149 if(ret < 0) … … 166 164 *cur_fs, 167 165 (PVFS_credentials *) creds, 168 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,169 166 addresses, &num_servers); 170 167 if(ret < 0) … … 177 174 for (i = 0; i < num_servers; i++) 178 175 { 179 server_type = 0;180 176 server_name = NULL; 181 177 182 178 /* get the pretty server name */ 183 server_name = PINT_cached_config_map_addr( 184 *cur_fs, addresses[i], &server_type); 179 server_name = PINT_cached_config_map_addr( *cur_fs, addresses[i]); 185 180 assert(server_name); 186 181 … … 1081 1076 err = PVFS_mgmt_count_servers(*cur_fs, 1082 1077 (PVFS_credentials *) creds, 1083 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,1084 1078 &server_count); 1085 1079 if(err < 0) … … 1102 1096 err = PVFS_mgmt_get_server_array(*cur_fs, 1103 1097 (PVFS_credentials *) creds, 1104 PVFS_MGMT_IO_SERVER | PVFS_MGMT_META_SERVER,1105 1098 PINT_handle_wrangler_handlelist.addr_array, 1106 1099 &server_count); … … 1544 1537 int i = 0; 1545 1538 int j = 0; 1546 int server_type = 0;1547 1539 PVFS_sysresp_getattr attributes; 1548 1540 PVFS_object_ref pref; … … 1554 1546 { 1555 1547 /* get the pretty server name */ 1556 server_name = PINT_cached_config_map_addr( 1557 *cur_fs, PINT_handle_wrangler_handlelist. 1558 addr_array[i], &server_type); 1548 server_name = PINT_cached_config_map_addr(*cur_fs, 1549 PINT_handle_wrangler_handlelist.addr_array[i]); 1559 1550 1560 1551 for (j = 0; j < PINT_handle_wrangler_handlelist.size_array[i]; j++) -
branches/orange-next/src/common/misc/pint-cached-config.c
r8959 r8960 474 474 return NULL; 475 475 } 476 477 478 /* PINT_cached_config_check_type()479 *480 * Retrieves the server type flags for a specified BMI addr string481 *482 * returns 0 on success, -errno on failure483 */484 int PINT_cached_config_check_type(485 PVFS_fs_id fsid,486 const char *server_addr_str,487 int* server_type)488 {489 int ret = -PVFS_EINVAL, i = 0;490 struct qlist_head *hash_link = NULL;491 struct config_fs_cache_s *cur_config_cache = NULL;492 493 hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid));494 if (!hash_link)495 {496 return(-PVFS_EINVAL);497 }498 cur_config_cache = qlist_entry(499 hash_link, struct config_fs_cache_s, hash_link);500 assert(cur_config_cache);501 assert(cur_config_cache->fs);502 503 ret = cache_server_array(fsid);504 if (ret < 0)505 {506 return(ret);507 }508 509 /* run through general server list for a match */510 for(i = 0; i < cur_config_cache->server_count; i++)511 {512 if (!(strcmp(cur_config_cache->server_array[i].addr_string,513 server_addr_str)))514 {515 *server_type = cur_config_cache->server_array[i].server_type;516 return(0);517 }518 }519 return(-PVFS_EINVAL);520 }521 522 476 523 477 /* PINT_cached_config_count_servers() -
branches/orange-next/src/common/misc/server-config.c
r8959 r8960 75 75 static DOTCONF_CB(get_trusted_network); 76 76 #endif 77 static DOTCONF_CB(get_range_list);78 77 static DOTCONF_CB(get_bmi_module_list); 79 78 static DOTCONF_CB(get_flow_module_list); … … 375 374 CTX_DISTRIBUTION,NULL}, 376 375 377 /* As logical files are created in pvfs, the data files and meta files378 * that represent them are given filesystem unique handle values. The379 * user can specify a range of values (or set of ranges)380 * to be allocated to data files and meta files for a particular server,381 * using the Range option in the DataHandleRanges and MetaHandleRanges382 * contexts. Note that in most cases, its easier to let the383 * pvfs2-genconfig script determine the best ranges to specify.384 *385 * This option specifies a range of handle values that can be used for386 * a particular pvfs server in a particular context (meta handles387 * or data handles). The DataHandleRanges and MetaHandleRanges contexts388 * should contain one or more Range options. The format is:389 *390 * Range {alias} {min value1}-{max value1}[, {min value2}-{max value2},...]391 *392 * Where {alias} is one of the alias strings already specified in the393 * Aliases context.394 *395 * {min value} and {max value} are positive integer values that specify396 * the range of possible handles that can be given out for that particular397 * host. {max value} must be less than 18446744073709551615 (UINT64_MAX).398 *399 * As shown in the specified format, multiple ranges can be specified for400 * the same alias. The format requires that max value of a given range401 * is less than the min value of the next one,402 * i.e. {max value1}<{min value2}403 *404 * Example of a Range option for data handles:405 *406 * Range mynode1 2147483651-4294967297407 */408 {"Range",ARG_LIST, get_range_list,NULL,409 CTX_METAHANDLERANGES|CTX_DATAHANDLERANGES,NULL},410 411 376 /* Specifies the handle value for the root of the Filesystem. This 412 377 * is a required option in the Filesystem context. The format is: … … 2480 2445 } 2481 2446 2482 DOTCONF_CB(get_range_list)2483 {2484 int i = 0;2485 struct filesystem_configuration_s *fs_conf = NULL;2486 struct server_configuration_s *config_s =2487 (struct server_configuration_s *)cmd->context;2488 2489 fs_conf = (struct filesystem_configuration_s *)2490 PINT_llist_head(config_s->file_systems);2491 assert(fs_conf);2492 2493 for(i = 0; i < cmd->arg_count; i += 2)2494 {2495 if (is_valid_alias(config_s->host_aliases, cmd->data.list[i]))2496 {2497 i++;2498 assert(cmd->data.list[i]);2499 2500 }2501 else2502 {2503 return("Unrecognized alias.\n");2504 }2505 }2506 return NULL;2507 }2508 2509 2447 DOTCONF_CB(get_param) 2510 2448 { -
branches/orange-next/src/common/misc/server-config.h
r8959 r8960 23 23 CTX_ALIASES = (1 << 3), 24 24 CTX_FILESYSTEM = (1 << 4), 25 CTX_METAHANDLERANGES = (1 << 5), 26 CTX_DATAHANDLERANGES = (1 << 6), 27 CTX_STORAGEHINTS = (1 << 7), 28 CTX_DISTRIBUTION = (1 << 8), 29 CTX_SECURITY = (1 << 9), 30 CTX_EXPORT = (1 << 10), 31 CTX_SERVER_OPTIONS = (1 << 11), 25 CTX_STORAGEHINTS = (1 << 5), 26 CTX_DISTRIBUTION = (1 << 6), 27 CTX_SECURITY = (1 << 7), 28 CTX_EXPORT = (1 << 8), 29 CTX_SERVER_OPTIONS = (1 << 9), 32 30 }; 33 31 … … 36 34 PVFS_BMI_addr_t addr; 37 35 char *addr_string; 38 int server_type;39 36 } phys_server_desc_s; 40 37 … … 125 122 char *host_id; 126 123 int host_index; 127 char *server_alias; /* the c ommand lineserver-alias parameter */124 char *server_alias; /* the cli server-alias parameter */ 128 125 int my_server_options; 129 126 char *data_path; /* path to data storage directory */ … … 137 134 int client_job_bmi_timeout; 138 135 int client_job_flow_timeout; 139 int client_retry_limit; /* how many times to retry client operations*/136 int client_retry_limit; /* retry client operations count */ 140 137 int client_retry_delay_ms; /* delay between retries */ 141 138 int perf_update_interval; /* how quickly (in msecs) to -
branches/orange-next/src/server/create.sm
r8959 r8960 154 154 int ret = -1; 155 155 job_id_t i; 156 server_configuration_s *config = get_server_config_struct();156 //server_configuration_s *config = get_server_config_struct(); 157 157 158 158 /* first state to check in, make sure the attr mask contains the dist bit. … … 167 167 return SM_ACTION_COMPLETE; 168 168 } 169 170 ret = PINT_cached_config_get_server(171 s_op->req->u.create.fs_id,172 config->host_id);173 169 174 170 ret = job_trove_dspace_create( … … 354 350 } 355 351 356 /* find local extent array */357 ret = PINT_cached_config_get_server(358 s_op->req->u.create.fs_id,359 config->host_id);360 if(ret < 0)361 {362 js_p->error_code = ret;363 return(SM_ACTION_COMPLETE);364 }365 366 352 /* deliberately not setting SYNC flag, because both the attrs and 367 353 * keyvals will be synced in later states -
branches/orange-next/src/server/unstuff.sm
r8959 r8960 225 225 struct PINT_smcb *smcb, job_status_s *js_p) 226 226 { 227 int ret ;228 job_id_t j_id;227 int ret = 0; 228 //job_id_t j_id; 229 229 struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); 230 230
