Changeset 8943

Show
Ignore:
Timestamp:
07/13/11 09:43:02 (2 years ago)
Author:
mtmoore
Message:

uuid changes, compiles now

Location:
branches/orange-next/src/apps/admin
Files:
16 modified

Legend:

Unmodified
Added
Removed
  • branches/orange-next/src/apps/admin/pvfs2-chmod.c

    r7471 r8943  
    115115      return -1; 
    116116    } 
    117     parent_ref.handle = resp_lookup.ref.handle; 
     117    PVFS_handle_copy(parent_ref.handle, resp_lookup.ref.handle); 
    118118    parent_ref.fs_id = resp_lookup.ref.fs_id; 
    119119  } 
  • branches/orange-next/src/apps/admin/pvfs2-chown.c

    r7471 r8943  
    121121      return -1; 
    122122    } 
    123     parent_ref.handle = resp_lookup.ref.handle; 
     123    PVFS_handle_copy(parent_ref.handle, resp_lookup.ref.handle); 
    124124    parent_ref.fs_id = resp_lookup.ref.fs_id; 
    125125  } 
  • branches/orange-next/src/apps/admin/pvfs2-cp.c

    r8875 r8943  
    498498                return (-1); 
    499499            } 
    500             parent_ref.handle = resp_lookup.ref.handle; 
     500            PVFS_handle_copy(parent_ref.handle, resp_lookup.ref.handle); 
    501501            parent_ref.fs_id = resp_lookup.ref.fs_id; 
    502502 
  • branches/orange-next/src/apps/admin/pvfs2-fs-dump.c

    r8932 r8943  
    247247    unsigned long *handle_count_array; 
    248248    unsigned long *total_count_array; 
    249     PVFS_ds_position *position_array; 
     249    PVFS_ds_position *ds_position_array; 
     250    PVFS_kv_position *kv_position_array; 
     251    unsigned int *position_flag_array; 
    250252    struct PVFS_mgmt_server_stat *stat_array; 
    251253    struct PVFS_mgmt_setparam_value param_value; 
     
    314316        return -1; 
    315317    } 
    316     position_array = (PVFS_ds_position *) calloc(server_count, sizeof(PVFS_ds_position)); 
    317     if (position_array == NULL) 
     318    ds_position_array =  
     319        (PVFS_ds_position *) calloc(server_count, sizeof(PVFS_ds_position)); 
     320    if (ds_position_array == NULL) 
    318321    { 
    319322        perror("malloc"); 
    320323        return -1; 
    321324    } 
     325    kv_position_array =  
     326        (PVFS_kv_position *) calloc(server_count, sizeof(PVFS_kv_position)); 
     327    if (kv_position_array == NULL) 
     328    { 
     329        perror("malloc"); 
     330        return -1; 
     331    } 
     332 
     333    position_flag_array = (unsigned int *) calloc(server_count,  
     334                                                  sizeof(unsigned int)); 
     335 
    322336    /* total_count_array */ 
    323337    total_count_array = (unsigned long *) calloc(server_count, sizeof(unsigned long)); 
     
    347361    { 
    348362        hcount_array[i] = HANDLE_BATCH; 
    349         /* FIX: position stuff changed to use small int and flag */ 
    350         position_array[i] = PVFS_ITERATE_START; 
     363        position_flag_array[i] = PVFS_ITERATE_START; 
    351364    } 
    352365 
     
    358371                                             handle_matrix, 
    359372                                             hcount_array, 
    360                                              position_array, 
     373                                             ds_position_array, 
     374                                             kv_position_array, 
     375                                             position_flag_array, 
    361376                                             addr_array, 
    362377                                             server_count, 
     
    406421        { 
    407422            /* FIX: position stuff changed to use small int and flag */ 
    408             if (position_array[i] != PVFS_ITERATE_END) 
     423            if (position_flag_array[i] != PVFS_ITERATE_END) 
    409424            { 
    410425                more_flag = 1; 
     
    430445    free(hcount_array); 
    431446    free(total_count_array); 
    432     free(position_array); 
     447    free(ds_position_array); 
     448    free(kv_position_array); 
     449    free(position_flag_array); 
    433450 
    434451    handlelist_finished_adding_handles(); 
     
    493510{ 
    494511    int i, count, ret; 
    495     PVFS_ds_position token; 
     512    PVFS_kv_position token; 
     513    unsigned int token_flag; 
    496514    PVFS_sysresp_readdir readdir_resp; 
    497515    PVFS_sysresp_getattr getattr_resp; 
     
    500518    count = 64; 
    501519 
    502     token = 0; 
     520    token_flag = PVFS_READDIR_START; 
    503521    do { 
    504522        memset(&readdir_resp, 0, sizeof(PVFS_sysresp_readdir)); 
    505         ret = PVFS_sys_readdir(pref, 
    506                          (!token ? PVFS_READDIR_START : token), 
     523        ret = PVFS_sys_readdir(pref, token, &token_flag, 
    507524                         count, 
    508525                         creds, 
     
    515532            PVFS_handle cur_handle; 
    516533 
    517             cur_handle = readdir_resp.dirent_array[i].handle; 
     534            PVFS_handle_copy(cur_handle, readdir_resp.dirent_array[i].handle); 
    518535            cur_file   = readdir_resp.dirent_array[i].d_name; 
    519536 
    520             entry_ref.handle = cur_handle; 
     537            PVFS_handle_copy(entry_ref.handle, cur_handle); 
    521538            entry_ref.fs_id  = cur_fs; 
    522539 
     
    566583            handlelist_remove_handle(cur_handle, server_idx); 
    567584        } 
    568         token = readdir_resp.token; 
     585        memcpy(&token, &readdir_resp.token, sizeof(PVFS_kv_position)); 
    569586        if (readdir_resp.pvfs_dirent_outcount) 
    570587        { 
     
    651668        char* fmt_string; 
    652669 
    653         entry_ref.handle = handle; 
     670        PVFS_handle_copy(entry_ref.handle, handle); 
    654671        entry_ref.fs_id  = cur_fs; 
    655672        /* only remaining handles are dirdata */ 
     
    745762 
    746763    for (i = 0; i < handle_count; i++) { 
    747         handlelist_list[server_idx][start_off + i] = handles[i]; 
     764        PVFS_handle_copy(handlelist_list[server_idx][start_off + i], 
     765            handles[i]); 
    748766    } 
    749767 
     
    796814            { 
    797815                /* move last entry to this position before decrement */ 
    798                 handlelist_list[server_idx][i] = 
    799                     handlelist_list[server_idx][handlelist_used[server_idx]-1]; 
     816                PVFS_handle_copy(handlelist_list[server_idx][i], 
     817                    handlelist_list[server_idx][handlelist_used[server_idx]-1]); 
    800818                 
    801819            } 
     
    821839    { 
    822840        if (handlelist_used[i] > 0) { 
    823             *handle_p = handlelist_list[i][handlelist_used[i]-1]; 
     841            PVFS_handle_copy(*handle_p,  
     842                handlelist_list[i][handlelist_used[i]-1]); 
    824843            handlelist_used[i]--; 
    825844            *server_idx_p = i; 
  • branches/orange-next/src/apps/admin/pvfs2-fsck.c

    r8932 r8943  
    254254    unsigned long *handle_count_array; 
    255255    unsigned long *total_count_array; 
    256     PVFS_ds_position *position_array; 
     256    PVFS_ds_position *ds_position_array; 
     257    PVFS_kv_position *kv_position_array; 
     258    unsigned int *position_flag_array; 
    257259    struct PVFS_mgmt_server_stat *stat_array; 
    258260    struct handlelist *hl; 
    259261    struct PVFS_mgmt_setparam_value param_value; 
    260262 
     263    /* FIX: need error handling to clean up memory if malloc failure later */ 
    261264    /* find out how many handles are in use on each */ 
    262265    stat_array = (struct PVFS_mgmt_server_stat *) 
     
    323326        return NULL; 
    324327    } 
    325     position_array = (PVFS_ds_position *) calloc(server_count, sizeof(PVFS_ds_position)); 
    326     if (position_array == NULL) 
     328    ds_position_array = (PVFS_ds_position *) calloc(server_count,  
     329        sizeof(PVFS_ds_position)); 
     330    if (ds_position_array == NULL) 
    327331    { 
    328332        perror("malloc"); 
    329333        return NULL; 
     334    } 
     335 
     336    kv_position_array = (PVFS_kv_position *) calloc(server_count,  
     337        sizeof(PVFS_kv_position)); 
     338    if (kv_position_array == NULL) 
     339    { 
     340        perror("malloc"); 
     341        return NULL; 
     342    } 
     343 
     344    position_flag_array = (unsigned int *) calloc(server_count,  
     345        sizeof(unsigned int)); 
     346    if( position_flag_array == NULL ) 
     347    { 
     348        perror("malloc"); 
     349        return NULL; 
    330350    } 
    331351    /* total_count_array */ 
     
    357377        hcount_array[i] = HANDLE_BATCH; 
    358378        /* FIX: position stuff changed to use small int and flag */ 
    359         position_array[i] = PVFS_ITERATE_START; 
     379        position_flag_array[i] = PVFS_ITERATE_START; 
    360380    } 
    361381 
     
    368388                                             handle_matrix, 
    369389                                             hcount_array, 
    370                                              position_array, 
     390                                             ds_position_array, 
     391                                             kv_position_array, 
     392                                             position_flag_array, 
    371393                                             addr_array, 
    372394                                             server_count, 
     
    399421                 * within valid ranges for the given server here. 
    400422                 */ 
    401                 ret = PINT_cached_config_map_to_server(&tmp_addr, handle_matrix[i][j], cur_fs); 
     423                ret = PINT_cached_config_map_to_server(&tmp_addr,  
     424                    handle_matrix[i][j], cur_fs); 
    402425                if (ret || tmp_addr != addr_array[i]) 
    403426                { 
    404                     fprintf(stderr, "Ugh! handle does not seem to be owned by the server!\n"); 
     427                    fprintf(stderr, "Ugh! handle does not seem to be owned " 
     428                                    "by the server!\n"); 
    405429                    return NULL; 
    406430                } 
     
    417441        for (i=0; i < server_count; i++) 
    418442        { 
    419             /* FIX: position stuff changed to use small int and flag */ 
    420             if (position_array[i] != PVFS_ITERATE_END) 
     443            if (position_flag_array[i] != PVFS_ITERATE_END) 
    421444            { 
    422445                more_flag = 1; 
     
    431454        if (total_count_array[i] != used_handles) 
    432455        { 
    433             fprintf(stderr, "Ugh! Server %d, Received %ld total handles instead of %ld\n", 
    434                     i, total_count_array[i], used_handles); 
     456            fprintf(stderr, "Ugh! Server %d, Received %ld total handles " 
     457                    "instead of %ld\n", i, total_count_array[i], used_handles); 
    435458            return NULL; 
    436459        } 
     
    443466    { 
    444467        hcount_array[i] = HANDLE_BATCH; 
    445         /* FIX: position stuff changed to use small int and flag */ 
    446         position_array[i] = PVFS_ITERATE_START; 
     468        position_flag_array[i] = PVFS_ITERATE_START; 
    447469    } 
    448470 
     
    454476                                             handle_matrix, 
    455477                                             hcount_array, 
    456                                              position_array, 
     478                                             ds_position_array, 
     479                                             kv_position_array, 
     480                                             position_flag_array, 
    457481                                             addr_array, 
    458482                                             server_count, 
     
    497521        for (i=0; i < server_count; i++) 
    498522        { 
    499             /* FIX: position stuff changed to use small int and flag */ 
    500             if (position_array[i] != PVFS_ITERATE_END) 
     523            if (position_flag_array[i] != PVFS_ITERATE_END) 
    501524            { 
    502525                more_flag = 1; 
     
    515538    free(hcount_array); 
    516539    free(total_count_array); 
    517     free(position_array); 
     540    free(ds_position_array); 
     541    free(kv_position_array); 
     542    free(position_flag_array); 
    518543 
    519544    free(stat_array); 
     
    611636{ 
    612637    int i, count; 
    613     PVFS_ds_position token;  
     638    PVFS_kv_position token;  
     639    unsigned int token_flag; 
    614640    PVFS_sysresp_readdir readdir_resp; 
    615641    PVFS_sysresp_getattr getattr_resp; 
    616     PVFS_object_ref entry_ref = {0, 0}; 
     642    PVFS_object_ref entry_ref; 
     643 
     644    entry_ref.fs_id = PVFS_FS_ID_NULL; 
     645    PVFS_handle_clear(entry_ref.handle); 
     646    memset(&token, 0, sizeof(PVFS_kv_position)); 
    617647 
    618648    count = 64; 
    619  
    620     token = 0; 
     649    token_flag = PVFS_READDIR_START; 
    621650    do { 
    622651        memset(&readdir_resp, 0, sizeof(PVFS_sysresp_readdir)); 
    623         PVFS_sys_readdir(dir_ref, 
    624                          (!token ? PVFS_READDIR_START : token), 
     652        PVFS_sys_readdir(dir_ref, token, &token_flag, 
    625653                         count, 
    626654                         creds, 
     
    633661            PVFS_handle cur_handle; 
    634662 
    635             cur_handle = readdir_resp.dirent_array[i].handle; 
     663            PVFS_handle_copy(cur_handle, readdir_resp.dirent_array[i].handle); 
    636664            cur_file   = readdir_resp.dirent_array[i].d_name; 
    637665 
    638             entry_ref.handle = cur_handle; 
     666            PVFS_handle_copy(entry_ref.handle, cur_handle); 
    639667            entry_ref.fs_id  = cur_fs; 
    640668 
     
    832860             * handle and dirent removed. 
    833861             */ 
    834             df_handles[i] = PVFS_HANDLE_NULL; 
     862            PVFS_handle_clear(df_handles[i]); 
    835863            error++; 
    836864        } 
     
    840868    for (i = 0; i < df_count; i++) 
    841869    { 
    842         if (df_handles[i] != PVFS_HANDLE_NULL) { 
     870        if (PVFS_handle_is_null(df_handles[i])) { 
    843871            /* TODO: THIS IS A HACK; NEED BETTER WAY TO REMOVE FROM 
    844872             * ONE OF TWO LISTS... 
     
    888916        PVFS_sysresp_getattr getattr_resp; 
    889917 
    890         handle_ref.handle = handle; 
     918        PVFS_handle_copy(handle_ref.handle, handle); 
    891919        handle_ref.fs_id  = cur_fs; 
    892920 
     
    969997        PVFS_sysresp_getattr getattr_resp; 
    970998 
    971         handle_ref.handle = handle; 
     999        PVFS_handle_copy(handle_ref.handle, handle); 
    9721000        handle_ref.fs_id  = cur_fs; 
    9731001 
     
    10801108        PVFS_sysresp_getattr getattr_resp; 
    10811109 
    1082         handle_ref.handle = handle; 
     1110        PVFS_handle_copy(handle_ref.handle, handle); 
    10831111        handle_ref.fs_id  = cur_fs; 
    10841112 
     
    13311359 
    13321360    for (i = 0; i < handle_count; i++) { 
    1333         hl->list_array[server_idx][start_off + i] = handles[i]; 
     1361        PVFS_handle_copy(hl->list_array[server_idx][start_off + i], 
     1362                        handles[i]); 
    13341363    } 
    13351364 
     
    13531382    } 
    13541383 
    1355     hl->list_array[server_idx][start_off] = handle; 
     1384    PVFS_handle_copy(hl->list_array[server_idx][start_off], handle); 
    13561385    hl->used_array[server_idx]++; 
    13571386} 
     
    14211450                { 
    14221451                    /* move last entry to this position before decrement */ 
    1423                     hl->list_array[server_idx][i] = 
    1424                         hl->list_array[server_idx][hl->used_array[server_idx]-1]; 
     1452                    PVFS_handle_copy( hl->list_array[server_idx][i], 
     1453                        hl->list_array[server_idx] 
     1454                            [hl->used_array[server_idx]-1]); 
    14251455                     
    14261456                } 
     
    14561486            { 
    14571487                /* move last entry to this position before decrement */ 
    1458                 hl->list_array[server_idx][i] = 
    1459                     hl->list_array[server_idx][hl->used_array[server_idx]-1]; 
     1488                PVFS_handle_copy(hl->list_array[server_idx][i], 
     1489                    hl->list_array[server_idx][hl->used_array[server_idx]-1]); 
    14601490                 
    14611491            } 
     
    14881518    { 
    14891519        if (hl->used_array[i] > 0) { 
    1490             *handle_p = hl->list_array[i][hl->used_array[i]-1]; 
     1520            PVFS_handle_copy(*handle_p, 
     1521                hl->list_array[i][hl->used_array[i]-1]); 
    14911522            hl->used_array[i]--; 
    14921523            *server_idx_p = i; 
  • branches/orange-next/src/apps/admin/pvfs2-ls.c

    r8935 r8943  
    488488    PVFS_credentials credentials; 
    489489    PVFS_object_ref ref; 
    490     PVFS_ds_position token; 
     490    PVFS_kv_position token; 
     491    unsigned int token_flag = 0; 
    491492    uint64_t dir_version = 0; 
    492493    double begin = 0., end; 
     
    511512    } 
    512513 
    513     ref.handle = lk_response.ref.handle; 
     514    PVFS_handle_copy(ref.handle, lk_response.ref.handle); 
    514515    ref.fs_id = fs_id; 
    515516    pvfs_dirent_incount = MAX_NUM_DIRENTS; 
    516517 
     518    memset(&token, 0, sizeof(PVFS_kv_position)); 
    517519    memset(&getattr_response,0,sizeof(PVFS_sysresp_getattr)); 
    518520    if (PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, 
     
    560562    if (do_timing) 
    561563        begin = Wtime(); 
    562     token = 0; 
     564    token_flag = PVFS_READDIR_START; 
    563565    do 
    564566    { 
    565567        memset(&rdplus_response, 0, sizeof(PVFS_sysresp_readdirplus)); 
    566568        ret = PVFS_sys_readdirplus( 
    567                 ref, (!token ? PVFS_READDIR_START : token), 
     569                ref, token, &token_flag, 
    568570                pvfs_dirent_incount, &credentials, 
    569571                (opts->list_long) ?  
     
    604606        { 
    605607            cur_file = rdplus_response.dirent_array[i].d_name; 
    606             cur_handle = rdplus_response.dirent_array[i].handle; 
     608            PVFS_handle_copy(cur_handle,  
     609                rdplus_response.dirent_array[i].handle); 
    607610 
    608611            print_entry(cur_file, cur_handle, fs_id, 
     
    643646            } 
    644647        } 
    645         token = rdplus_response.token; 
     648        memcpy(&token, &rdplus_response.token, sizeof(PVFS_kv_position)); 
    646649 
    647650        if (rdplus_response.pvfs_dirent_outcount) 
  • branches/orange-next/src/apps/admin/pvfs2-migrate-collection.c

    r7959 r8943  
    693693    TROVE_context_id trove_context = -1; 
    694694    char current_path[PATH_MAX]; 
    695  
     695    TROVE_handle handle; 
     696 
     697    PVFS_handle_clear(handle); 
    696698    /* rename old collection */ 
    697699    snprintf(current_path, PATH_MAX, "%s/%08x", meta_storage_space, coll_id); 
     
    733735        coll_name, 
    734736        coll_id,  
    735         TROVE_HANDLE_NULL, 
     737        handle, 
    736738        handle_range, 
    737739        NULL, 
     
    10831085    int count = 0; 
    10841086    TROVE_ds_state state; 
    1085     TROVE_handle_extent cur_extent; 
    1086     TROVE_handle_extent_array extent_array; 
    10871087    TROVE_handle new_handle; 
    10881088    TROVE_handle* tmp_handle; 
     
    11681168                llu(*tmp_handle), (int)tmp_attr->type); 
    11691169 
    1170             cur_extent.first = cur_extent.last = *tmp_handle; 
    1171             extent_array.extent_count = 1; 
    1172             extent_array.extent_array = &cur_extent; 
    1173  
    11741170            state = 0; 
    11751171            ret = trove_dspace_create( 
    1176                 coll_id, &extent_array, &new_handle, 
     1172                coll_id, &new_handle, 
    11771173                tmp_attr->type, NULL, 
    11781174                (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), 
     
    12021198             */ 
    12031199            new_attr.fs_id = tmp_attr->fs_id; 
    1204             new_attr.handle = tmp_attr->handle; 
     1200            PVFS_handle_copy(new_attr.handle, tmp_attr->handle); 
    12051201            new_attr.type = tmp_attr->type; 
    12061202            new_attr.uid = tmp_attr->uid; 
     
    12841280            { 
    12851281                /* scan the handle value out of the file name */ 
    1286 #if SIZEOF_LONG_INT == 4 
    1287                 ret = sscanf(tmp_ent->d_name, "%llx.keyval", 
    1288                     &(llu(tmp_handle))); 
    1289 #elif SIZEOF_LONG_INT == 8 
    1290                 ret = sscanf(tmp_ent->d_name, "%lx.keyval", 
    1291                     &(tmp_handle)); 
    1292 #else 
    1293 #error Unexpected sizeof(long int) 
    1294 #endif 
    1295                 if(ret != 1) 
    1296                 { 
    1297                     fprintf(stderr, "Error: malformed file name %s in %s\n", 
    1298                         tmp_ent->d_name, bucket_dir); 
    1299                     closedir(tmp_dir); 
    1300                     return(-1); 
    1301                 } 
     1282                PVFS_handle_unparse(tmp_handle, (char *)tmp_ent->d_name); 
     1283 
    13021284                snprintf(keyval_db, PATH_MAX, "%s/keyvals/%.8d/%s", 
    13031285                    old_coll_path, i, tmp_ent->d_name); 
  • branches/orange-next/src/apps/admin/pvfs2-mkdir.c

    r7471 r8943  
    290290    } 
    291291     
    292     parent_ref.handle = resp_lookup.ref.handle; 
     292    PVFS_handle_copy(parent_ref.handle, resp_lookup.ref.handle); 
    293293    parent_ref.fs_id  = resp_lookup.ref.fs_id; 
    294294 
  • branches/orange-next/src/apps/admin/pvfs2-mkspace.c

    r8658 r8943  
    3737 
    3838static int default_verbose = 0; 
    39 static PVFS_handle default_root_handle = PVFS_HANDLE_NULL; 
     39static PVFS_handle default_root_handle; 
    4040static int default_collection_only = 0; 
    4141static char default_meta_ranges[PATH_MAX] = "4-2147483650"; 
     
    166166            case 'r': 
    167167          do_root_handle: 
    168 #ifdef HAVE_STRTOULL 
    169                 opts->root_handle = (PVFS_handle) 
    170                     strtoull(optarg, NULL, 10); 
    171 #else 
    172                 opts->root_handle = (PVFS_handle) 
    173                     strtoul(optarg, NULL, 10); 
    174 #endif 
     168                PVFS_handle_parse(optarg, opts->root_handle); 
    175169                break; 
    176170            case 'M': 
     
    297291    { 
    298292        opts.verbose = default_verbose; 
    299         opts.root_handle = default_root_handle; 
     293        PVFS_handle_copy(opts.root_handle, default_root_handle); 
    300294        opts.collection_only = default_collection_only; 
    301295        strncpy(opts.meta_ranges, default_meta_ranges, PATH_MAX); 
  • branches/orange-next/src/apps/admin/pvfs2-ping.c

    r8929 r8943  
    208208 
    209209    param_value.type = PVFS_MGMT_PARAM_TYPE_UINT64; 
    210     PVFS_hanlde_copy(param_value.u.handle_value, resp_lookup.ref.handle); 
     210    PVFS_handle_copy(param_value.u.handle_value, resp_lookup.ref.handle); 
    211211 
    212212    /* check that only one server controls root handle */ 
  • branches/orange-next/src/apps/admin/pvfs2-remove-object.c

    r7528 r8943  
    133133          do_object: 
    134134                tmp_opts->remove_object_only = 1; 
    135                 tmp_opts->object_handle = 
    136                     (PVFS_handle)strtoull(optarg, NULL,10); 
     135                PVFS_handle_parse(optarg, tmp_opts->object_handle); 
    137136                break; 
    138137            case 'p': 
    139138          do_parent: 
    140                 tmp_opts->parent_handle = 
    141                     (PVFS_handle)strtoull(optarg, NULL,10); 
     139                PVFS_handle_parse( optarg, tmp_opts->parent_handle ); 
    142140                break; 
    143141            case 'd': 
     
    175173    if (user_opts->remove_object_only) 
    176174    { 
    177         ref.handle = user_opts->object_handle; 
    178         if ((ref.handle == PVFS_HANDLE_NULL) || 
     175        PVFS_handle_copy(ref.handle, user_opts->object_handle); 
     176        if ((PVFS_handle_is_null(ref.handle)) || 
    179177            (ref.fs_id == PVFS_FS_ID_NULL)) 
    180178        { 
     
    186184    else 
    187185    { 
    188         ref.handle = user_opts->parent_handle; 
    189         if ((ref.handle == PVFS_HANDLE_NULL) || 
     186        PVFS_handle_copy(ref.handle, user_opts->parent_handle); 
     187        if (PVFS_handle_is_null(ref.handle) || 
    190188            (ref.fs_id == PVFS_FS_ID_NULL)) 
    191189        { 
  • branches/orange-next/src/apps/admin/pvfs2-showcoll.c

    r8934 r8943  
    223223                /* TODO: USE BIGGER VALUE */ 
    224224                got_dspace_handle = 1; 
    225                 dspace_handle = strtol(optarg, NULL, 16); 
     225                PVFS_handle_parse(optarg, dspace_handle); 
    226226                break; 
    227227            case 'v': 
     
    364364{ 
    365365    int ret, count; 
    366     TROVE_ds_position pos; 
     366    TROVE_kv_position pos; 
     367    unsigned int pos_flag; 
    367368    TROVE_keyval_s key, val; 
    368369    TROVE_op_id op_id; 
     
    391392    } 
    392393 
    393  
    394     pos = TROVE_ITERATE_START; 
     394    pos_flag = TROVE_ITERATE_START; 
    395395    count = 1; 
    396396 
     
    403403                                   handle, 
    404404                                   &pos, 
     405                                   &pos_flag, 
    405406                                   &key, 
    406407                                   &val, 
  • branches/orange-next/src/apps/admin/pvfs2-stat.c

    r8317 r8943  
    224224   } 
    225225 
    226    ref.handle = lk_response.ref.handle; 
     226   PVFS_handle_copy(ref.handle, lk_response.ref.handle); 
    227227   ref.fs_id  = fs_id; 
    228228    
  • branches/orange-next/src/apps/admin/pvfs2-validate.c

    r7471 r8943  
    265265                char new_path[PVFS_SEGMENT_MAX]; 
    266266 
    267                 obj_ref.handle = directory_entries[j].handle; 
     267                PVFS_handle_copy(obj_ref.handle, directory_entries[j].handle); 
    268268                obj_ref.fs_id = *cur_fs; 
    269269 
  • branches/orange-next/src/apps/admin/pvfs2-viewdist.c

    r7471 r8943  
    178178        PVFS_handle *ptr = (PVFS_handle *) ((char *) buffer + ret * sizeof(PVFS_handle)); 
    179179        servers[ret] = (char *) calloc(1, PVFS_MAX_SERVER_ADDR_LEN); 
    180         handles[ret] = *ptr; 
     180        PVFS_handle_copy(handles[ret], *ptr); 
    181181        if (servers[ret] == NULL) 
    182182        { 
     
    410410            return (-1); 
    411411        } 
    412         ref.handle = resp_lookup.ref.handle; 
     412        PVFS_handle_copy(ref.handle, resp_lookup.ref.handle); 
    413413        ref.fs_id = resp_lookup.ref.fs_id; 
    414414 
  • branches/orange-next/src/apps/admin/pvfs2-xattr.c

    r8592 r8943  
    733733            return (-1); 
    734734        } 
    735         ref.handle = resp_lookup.ref.handle; 
     735        PVFS_handle_copy(ref.handle, resp_lookup.ref.handle); 
    736736        ref.fs_id = resp_lookup.ref.fs_id; 
    737737