Changeset 7958

Show
Ignore:
Timestamp:
09/02/09 17:10:52 (4 years ago)
Author:
dbonnie
Message:

Undo accidental commit to MAIN. Reverted each file to pre-commit version.

Location:
trunk
Files:
49 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/apps/admin/pvfs2-change-fsid.c

    r7952 r7958  
    3939    char fs_conf[PATH_MAX]; 
    4040    char fs_name[PATH_MAX]; 
    41     char data_storage_path[PATH_MAX]; 
    42     char meta_storage_path[PATH_MAX]; 
     41    char storage_path[PATH_MAX]; 
    4342    int32_t old_fsid; 
    4443    int32_t new_fsid; 
     
    315314{ 
    316315    FILE * fptr = NULL; 
    317     char datacommand[PATH_MAX]; 
    318     char metacommand[PATH_MAX]; 
    319     char dataoutput[PATH_MAX]; 
    320     char metaoutput[PATH_MAX]; 
     316    char command[PATH_MAX]; 
     317    char output[PATH_MAX]; 
    321318    struct stat buf; 
    322     char datapath[PATH_MAX]; 
    323     char new_datapath[PATH_MAX]; 
    324     char metapath[PATH_MAX]; 
    325     char new_metapath[PATH_MAX]; 
     319    char path[PATH_MAX]; 
     320    char new_path[PATH_MAX]; 
    326321    int ret = 0; 
    327322     
    328     memset(datapath, 0, sizeof(datapath)); 
    329     memset(metapath, 0, sizeof(metapath)); 
    330     sprintf(datapath, "%s%s", opts.data_storage_path, opts.old_fsid_hex); 
    331     sprintf(metapath, "%s/%s", opts.meta_storage_path, opts.old_fsid_hex); 
    332  
    333     /* See if each directory exists */ 
    334     ret = stat(datapath, &buf); 
     323    memset(path,0,sizeof(path)); 
     324    sprintf(path,"%s/%s", opts.storage_path, opts.old_fsid_hex); 
     325 
     326    /* See if directory exists */ 
     327    ret = stat(path, &buf); 
    335328    if(ret) 
    336329    { 
    337330        fprintf(stderr, 
    338                 "Error checking for data directory's existance. [%s]\n", 
    339                 datapath); 
    340         return -1; 
    341     } 
    342     ret = stat(metapath, &buf); 
    343     if(ret) 
    344     { 
    345         fprintf(stderr, 
    346                 "Error checking for meta directory's existance. [%s]\n", 
    347                 metapath); 
     331                "Error checking for directory's existance. [%s]\n", 
     332                path); 
    348333        return -1; 
    349334    } 
     
    356341    } 
    357342     
    358         memset(datacommand, 0, sizeof(datacommand)); 
    359         memset(metacommand, 0, sizeof(metacommand)); 
    360         memset(dataoutput, 0, sizeof(dataoutput)); 
    361         memset(metaoutput, 0, sizeof(metaoutput)); 
    362         memset(new_datapath, 0, sizeof(new_datapath)); 
    363     memset(new_metapath, 0, sizeof(new_metapath)); 
    364  
    365     /* Move the directories */ 
    366         sprintf(new_datapath, "%s/%s", opts.data_storage_path, opts.new_fsid_hex); 
    367         sprintf(new_metapath, "%s%s", opts.meta_storage_path, opts.new_fsid_hex); 
    368         sprintf(datacommand, "mv %s %s", datapath, new_datapath); 
    369         sprintf(metacommand, "mv %s %s", metapath, new_metapath); 
    370  
    371         /* move the data dir */ 
    372     fptr = popen(datacommand, "r"); 
     343    memset(command,0,sizeof(command)); 
     344    memset(output,0,sizeof(output)); 
     345    memset(new_path,0,sizeof(new_path)); 
     346 
     347    /* Move the directory */ 
     348    sprintf(new_path, "%s/%s", opts.storage_path, opts.new_fsid_hex); 
     349    sprintf(command, "mv %s %s", path, new_path); 
     350 
     351    fptr = popen(command, "r"); 
    373352    if(fptr == NULL) 
    374353    { 
     
    376355        exit(-1); 
    377356    } 
    378     ret = fscanf(fptr, "%s", dataoutput); 
    379     if(ret && strncmp(dataoutput,"",PATH_MAX)) 
    380     { 
    381         printf("mv from [%s] to [%s] failed.\n", datapath, new_datapath); 
     357    ret = fscanf(fptr, "%s", output); 
     358    if(ret && strncmp(output,"",PATH_MAX)) 
     359    { 
     360        printf("mv from [%s] to [%s] failed.\n", path, new_path); 
    382361        return -1; 
    383362    } 
    384363    pclose(fptr); 
    385364 
    386         /* move the meta dir */ 
    387         fptr = popen(metacommand, "r"); 
    388     if(fptr == NULL) 
    389     { 
    390         fprintf(stderr,"Error opening pipe. errno=%d",errno); 
    391         exit(-1); 
    392     } 
    393     ret = fscanf(fptr, "%s", metaoutput); 
    394     if(ret && strncmp(metaoutput,"",PATH_MAX)) 
    395     { 
    396         printf("mv from [%s] to [%s] failed.\n", metapath, new_metapath); 
    397         return -1; 
    398     } 
    399     pclose(fptr); 
    400  
    401365    if(opts.verbose) 
    402366    { 
    403         printf("Successful data dir move from [%s] to [%s]\n", datapath, new_datapath); 
    404                 printf("Successful meta dir move from [%s] to [%s]\n", metapath, new_metapath); 
     367        printf("Successful dir move from [%s] to [%s]\n", path, new_path); 
    405368    } 
    406369 
     
    554517        {"dbpath",1,0,0}, 
    555518        {"fsconf",1,0,0}, 
    556         {"datastorage",1,0,0}, 
    557         {"metastorage",1,0,0}, 
     519        {"storage",1,0,0}, 
    558520        {"view",0,0,0}, 
    559521        {0,0,0,0} 
     
    600562                break; 
    601563 
    602             case 7: /* data storage */ 
    603                 strncpy(opts.data_storage_path, optarg, PATH_MAX); 
    604                 break; 
    605  
    606                 case 8: /* meta storage */ 
    607                                 strncpy(opts.meta_storage_path, optarg, PATH_MAX); 
    608                                 break; 
    609  
    610             case 9: /* view */ 
     564            case 7: /* storage */ 
     565                strncpy(opts.storage_path, optarg, PATH_MAX); 
     566                break; 
     567 
     568            case 8: /* view */ 
    611569                opts.view_only = 1; 
    612570                break; 
     
    635593    } 
    636594 
    637     /* data storage_path must be set */ 
    638     if(!strncmp(opts.data_storage_path,"",PATH_MAX)) 
    639     { 
    640         fprintf(stderr,"Error: --datastorage option must be given.\n"); 
    641         print_help(argv[0]); 
    642         return(-1); 
    643     } 
    644  
    645     /* meta storage_path must be set */ 
    646     if(!strncmp(opts.meta_storage_path,"",PATH_MAX)) 
    647     { 
    648         fprintf(stderr,"Error: --metastorage option must be given.\n"); 
     595    /* storage_path must be set */ 
     596    if(!strncmp(opts.storage_path,"",PATH_MAX)) 
     597    { 
     598        fprintf(stderr,"Error: --storage option must be given.\n"); 
    649599        print_help(argv[0]); 
    650600        return(-1); 
     
    663613    fprintf(stderr,"  --fsconf=</path/to/pvfs2-fs.conf>     " 
    664614            "Fs config file for the the file system being modified.\n"); 
    665     fprintf(stderr,"  --datastorage=</path/to/pvfs2-data-storage-space>     " 
    666             "Local data storage space for the the file system being modified.\n"); 
    667     fprintf(stderr,"  --metastorage=</path/to/pvfs2-meta-storage-space>     " 
    668             "Local meta storage space for the the file system being modified.\n"); 
     615    fprintf(stderr,"  --storage=</path/to/pvfs2-storage-space>     " 
     616            "Local storage space for the the file system being modified.\n"); 
    669617    fprintf(stderr, "\n"); 
    670618    fprintf(stderr,"The following arguments are optional:\n"); 
  • trunk/src/apps/admin/pvfs2-genconfig

    r7952 r7958  
    5757 
    5858my $default_storage = undef; 
    59 my $default_meta_storage = undef; 
    6059my $default_logfile = undef; 
    6160 
     
    217216    if(defined($default_storage)) 
    218217    { 
    219         print $target "\n\tDataStorageSpace " . $default_storage . "\n"; 
    220     } 
    221  
    222     if(defined($default_meta_storage)) 
    223     { 
    224         print $target "\tMetadataStorageSpace " . $default_meta_storage . "\n\n"; 
     218        print $target "\n\tStorageSpace " . $default_storage . "\n"; 
    225219    } 
    226220 
     
    386380        print $target "\n<ServerOptions>\n"; 
    387381        print $target "\tServer $alias\n"; 
    388         print $target "\tDataStorageSpace $endpoint->{STORAGE}\n"; 
    389         print $target "\tMetadataStorageSpace $endpoint->{METASTORAGE}\n"; 
     382        print $target "\tStorageSpace $endpoint->{STORAGE}\n"; 
    390383        print $target "\tLogFile $endpoint->{LOGFILE}\n"; 
    391384        print $target "</ServerOptions>\n"; 
     
    396389sub emit_server_conf 
    397390{ 
    398     my($target, $node, $storage, $metastorage, $logfile) = @_; 
    399  
    400     print $target "DataStorageSpace $storage\n"; 
    401     print $target "MetadataStorageSpace $metastorage\n"; 
     391    my($target, $node, $storage, $logfile) = @_; 
     392 
     393    print $target "StorageSpace $storage\n"; 
    402394    print $target "HostID \"" . get_bmi_endpoint($node) . "\"\n"; 
    403395    print $target "LogFile $logfile\n"; 
     
    850842} 
    851843 
    852 sub get_meta_storage 
    853 { 
    854     my $metastorage = "/pvfs2-storage-space"; 
    855     if ($opt_storage) { 
    856         $metastorage = $opt_storage; 
    857     } elsif (!$opt_quiet) { 
    858             print $OUT "Choose a directory for each server to store metadata in.\n"; 
    859             $metastorage = prompt_word("Enter directory name: [Default is /pvfs2-storage-space]: ","/pvfs2-storage-space"); 
    860     } 
    861     return $metastorage; 
    862 } 
     844 
    863845 
    864846# get host port 
     
    966948    my $portmap = shift; 
    967949    my $storage = shift; 
    968     my $metastorage = shift; 
    969950    my $logfile = shift; 
    970951    my $ioline = ''; 
     
    996977                HOSTNAME => $io_host,  
    997978                PORTMAP => $portmap,  
    998                 STORAGE => $storage, 
    999                 METASTORAGE => $metastorage,  
     979                STORAGE => $storage,  
    1000980                LOGFILE => $logfile}; 
    1001981        } 
     
    1007987    my $portmap = shift; 
    1008988    my $storage = shift; 
    1009     my $metastorage = shift; 
    1010989    my $logfile = shift; 
    1011990    my $metaline = ''; 
     
    10531032                HOSTNAME => $meta_host,  
    10541033                PORTMAP => $portmap,  
    1055                 STORAGE => $storage, 
    1056                 METASTORAGE => $metastorage,  
     1034                STORAGE => $storage,  
    10571035                LOGFILE => $logfile}; 
    10581036        } 
     
    10831061    { 
    10841062        my $stor = undef; 
    1085         my $mstor = undef; 
    10861063        my $logf = undef; 
    10871064        my $proto = undef; 
     
    10941071            # endpoint.  We want to match on [...]:storage:logfile 
    10951072            # and place the stuff between the [] in $1, and optionally 
    1096             # place the matched storage path and meta path in $2 and $3, 
    1097             # logfile is in $4 
     1073            # place the matched storage path and logfile in $2 and $3  
    10981074            # 
    10991075            $ep =~ /\[([^\]]+)\](?::([^:]+))?(?::([^:]+))?/; 
    11001076 
    11011077            $stor = $2; 
    1102             $mstor = $3; 
    1103             $logf = $4; 
     1078            $logf = $3; 
    11041079 
    11051080            if(!defined($1)) 
     
    11521127                HOSTNAME => $hostname,  
    11531128                PORTMAP => \%port,  
    1154                 STORAGE => $stor, 
    1155                 METASTORAGE => $mstor,  
     1129                STORAGE => $stor,  
    11561130                LOGFILE => $logf}; 
    11571131        } 
     
    12001174            my $pranges = $4; 
    12011175            $stor = $5; 
    1202             $mstor = $6; 
    1203             $logf = $7; 
     1176            $logf = $6; 
    12041177 
    12051178            if($proto !~ /mx/) 
    12061179            { 
    12071180                $logf = $stor; 
    1208                 $stor = $mstor; 
    1209                 $mstor = $pranges; 
     1181                $stor = $pranges; 
    12101182                $pranges = $branges; 
    12111183                $branges = undef; 
     
    12491221                                PORTMAP => $portmap,  
    12501222                                STORAGE => $stor,  
    1251                                 METASTORAGE => $mstor, 
    12521223                                LOGFILE => $logf}; 
    12531224                        } 
     
    12711242                                    PORTMAP => $portmap, 
    12721243                                    STORAGE => $stor, 
    1273                                     METASTORAGE => $mstor, 
    12741244                                    LOGFILE => $logf}; 
    12751245                            } 
     
    13101280                                        PORTMAP => $portmap, 
    13111281                                        STORAGE => $stor, 
    1312                                         METASTORAGE => $mstor, 
    13131282                                        LOGFILE => $logf}; 
    13141283                                } 
     
    15271496 
    15281497    $default_storage = get_storage(); 
    1529     $default_meta_storage = get_meta_storage(); 
    15301498    $default_logfile = get_logfile(); 
    15311499 
    15321500    get_ionames($portmap, $default_storage, $default_logfile); 
    1533     get_metanames($portmap, $default_meta_storage, $default_logfile); 
     1501    get_metanames($portmap, $default_storage, $default_logfile); 
    15341502} 
    15351503 
     
    15451513    set_default_value(STORAGE, $default_storage); 
    15461514    set_default_value(STORAGE, $default_storage); 
    1547 } 
    1548  
    1549 if(needs_default_value(METASTORAGE)) 
    1550 { 
    1551     if(!defined($default_meta_storage)) 
    1552     { 
    1553         $default_meta_storage = get_meta_storage(); 
    1554     } 
    1555     set_default_value(METASTORAGE, $default_meta_storage); 
    1556     set_default_value(METASTORAGE, $default_meta_storage); 
    15571515} 
    15581516 
  • trunk/src/apps/admin/pvfs2-migrate-collection.c

    r7952 r7958  
    6363static int parse_args(int argc, char **argv, options_t *opts); 
    6464static int src_get_version( 
    65     char* meta_storage_space, TROVE_coll_id coll_id, char* coll_name, 
     65    char* storage_space, TROVE_coll_id coll_id, char* coll_name, 
    6666    char* ver_string, int ver_string_max); 
    67 static int remove_collection_entry(char* meta_storage_space, char* collname); 
     67static int remove_collection_entry(char* storage_space, char* collname); 
    6868 
    6969int migrate_collection(void * config, void * sconfig); 
     
    7373/* functions specific to reading 0.0.1 collections */ 
    7474static int src_get_version_0_0_1( 
    75     char* meta_storage_space, TROVE_coll_id coll_id,  
     75    char* storage_space, TROVE_coll_id coll_id,  
    7676    char* ver_string, int ver_string_max); 
    7777static int translate_0_0_1( 
    78     char* data_storage_space, char* meta_storage_space, char* old_coll_path,  
     78    char* storage_space, char* old_coll_path,  
    7979    char* coll_name, TROVE_coll_id coll_id); 
    8080static int translate_coll_eattr_0_0_1( 
     
    8888    TROVE_context_id trove_context); 
    8989static int translate_bstreams_0_0_1( 
    90     char* data_storage_space, char* old_coll_path,  
     90    char* storage_space, char* old_coll_path,  
    9191    TROVE_coll_id coll_id, char* coll_name, 
    9292    TROVE_context_id trove_context); 
     
    233233        (struct server_configuration_s *) sconfig; 
    234234 
    235     if(server_config->meta_path == NULL) 
    236     { 
    237         server_config->meta_path = server_config->data_path; 
    238     } 
    239  
    240235    memset(version, 0, 256); 
    241236    /* find version of source storage space */ 
    242237    ret = src_get_version( 
    243         server_config->meta_path,  
     238        server_config->storage_path,  
    244239        fs_config->coll_id,  
    245240        fs_config->file_system_name, 
     
    258253    { 
    259254        sprintf(old_coll_path, "%s/%08x-old-%s", 
    260                 server_config->meta_path,  
     255                server_config->storage_path,  
    261256                fs_config->coll_id, version); 
    262257 
     
    297292 
    298293        ret = translate_0_0_1( 
    299             server_config->data_path,  
    300             server_config->meta_path, 
    301             old_coll_path,  
     294            server_config->storage_path, old_coll_path,  
    302295            fs_config->file_system_name,  
    303296            fs_config->coll_id); 
     
    334327             * is anymore 
    335328             */ 
    336             DIR * data_storage_dir; 
    337             DIR * meta_storage_dir; 
     329            DIR * storage_dir; 
    338330            struct dirent * next_dirent; 
    339331            char collname[PATH_MAX]; 
     
    343335            collname_length = sprintf(collname, "%08x-old", fs_config->coll_id); 
    344336 
    345             data_storage_dir = opendir(server_config->data_path); 
    346             if(!data_storage_dir) 
    347             { 
    348                 fprintf(stderr, "Error: failed to open data directory: %s\n", 
    349                         server_config->data_path); 
     337            storage_dir = opendir(server_config->storage_path); 
     338            if(!storage_dir) 
     339            { 
     340                fprintf(stderr, "Error: failed to open directory: %s\n", 
     341                        server_config->storage_path); 
    350342                return -1; 
    351343            } 
    352344 
    353             while((next_dirent = readdir(data_storage_dir)) != NULL) 
     345            while((next_dirent = readdir(storage_dir)) != NULL) 
    354346            { 
    355347                int d_namelen = strlen(next_dirent->d_name); 
     
    360352 
    361353                    sprintf(old_coll_path, "%s/%s", 
    362                             server_config->data_path, next_dirent->d_name); 
     354                            server_config->storage_path, next_dirent->d_name); 
    363355 
    364356                    /* found an old version, delete it */ 
     
    373365                            "Error: failed to remove old collection at: %s\n", 
    374366                            old_coll_path); 
    375                         closedir(data_storage_dir); 
     367                        closedir(storage_dir); 
    376368                        return -1; 
    377369                    } 
     
    380372            } 
    381373 
    382             /* if the meta and data paths are the same, don't try to remove twice */ 
    383             if (strcmp(server_config->data_path, server_config->meta_path)) 
    384             { 
    385                 meta_storage_dir = opendir(server_config->meta_path); 
    386                 if(!meta_storage_dir) 
    387                 { 
    388                     fprintf(stderr, "Error: failed to open meta directory: %s\n", 
    389                         server_config->meta_path); 
    390                     return -1; 
    391                 } 
    392  
    393                 while((next_dirent = readdir(meta_storage_dir)) != NULL) 
    394                 { 
    395                     int d_namelen = strlen(next_dirent->d_name); 
    396                     if(collname_length < d_namelen && 
    397                        strncmp(next_dirent->d_name, collname, collname_length) == 0) 
    398                     {  
    399                         char old_coll_path[PATH_MAX]; 
    400  
    401                         sprintf(old_coll_path, "%s/%s", 
    402                                 server_config->meta_path, next_dirent->d_name); 
    403  
    404                          /* found an old version, delete it */ 
    405                         if(verbose)  
    406                             printf("VERBOSE Removing old collection at: %s\n", 
    407                                    old_coll_path); 
    408                         ret = recursive_rmdir(old_coll_path); 
    409                         if(ret < 0) 
    410                         { 
    411                             fprintf( 
    412                                 stderr,  
    413                                 "Error: failed to remove old collection at: %s\n", 
    414                                 old_coll_path); 
    415                             closedir(meta_storage_dir); 
    416                             return -1; 
    417                         } 
    418                         removed_olddirs = 1; 
    419                     } 
    420                 } 
    421                 closedir(meta_storage_dir); 
    422             } 
    423  
    424374            if(removed_olddirs == 0) 
    425375            { 
     
    429379            } 
    430380 
    431             closedir(data_storage_dir); 
     381            closedir(storage_dir); 
    432382        } 
    433383        else 
     
    576526 */ 
    577527static int src_get_version( 
    578     char* meta_storage_space,       /**< path to storage space */ 
     528    char* storage_space,       /**< path to storage space */ 
    579529    TROVE_coll_id coll_id,     /**< collection id */ 
    580530    char* coll_name,           /**< collection name */ 
     
    586536 
    587537    ret = src_get_version_0_0_1( 
    588         meta_storage_space, coll_id, ver_string, ver_string_max); 
     538        storage_space, coll_id, ver_string, ver_string_max); 
    589539 
    590540    if(ret != 0) 
     
    593543                "Error: all known collection version checks " 
    594544                "failed for \ncollection %s (%08x) in storage space %s\n",  
    595                 coll_name, coll_id, meta_storage_space); 
     545                coll_name, coll_id, storage_space); 
    596546    } 
    597547 
     
    605555 */ 
    606556static int src_get_version_0_0_1( 
    607     char* meta_storage_space,   /**< path to storage space */ 
     557    char* storage_space,   /**< path to storage space */ 
    608558    TROVE_coll_id coll_id, /**< collection id */ 
    609559    char* ver_string,      /**< version in string format */ 
     
    616566 
    617567    sprintf(coll_db, "%s/%08x/collection_attributes.db",  
    618             meta_storage_space, coll_id); 
     568            storage_space, coll_id); 
    619569 
    620570    /* try to find a collections db */ 
     
    679629 */ 
    680630static int translate_0_0_1( 
    681     char* data_storage_space,   /**< path to data storage space */ 
    682     char* meta_storage_space, /**< path to metadata storage space */ 
     631    char* storage_space,   /**< path to storage space */ 
    683632    char* old_coll_path,   /**< path to old collection */ 
    684633    char* coll_name,       /**< collection name */ 
     
    695644 
    696645    /* rename old collection */ 
    697     snprintf(current_path, PATH_MAX, "%s/%08x", meta_storage_space, coll_id); 
     646    snprintf(current_path, PATH_MAX, "%s/%08x", storage_space, coll_id); 
    698647 
    699648    if(access(current_path, F_OK) != 0) 
     
    714663    } 
    715664 
    716     ret = remove_collection_entry(meta_storage_space, coll_name); 
     665    ret = remove_collection_entry(storage_space, coll_name); 
    717666    if(ret < 0) 
    718667    { 
     
    729678        printf("VERBOSE Creating temporary collection to migrate to.\n"); 
    730679    ret = pvfs2_mkspace( 
    731         data_storage_space, 
    732         meta_storage_space, 
     680        storage_space,  
    733681        coll_name, 
    734682        coll_id,  
     
    751699        PVFS_perror("PINT_dist_initialize", ret); 
    752700        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    753         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     701        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    754702        return(-1); 
    755703    } 
     
    757705    /* initialize trove and lookup collection */ 
    758706    ret = trove_initialize( 
    759         TROVE_METHOD_DBPF, NULL, data_storage_space, meta_storage_space,0); 
     707        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    760708    if (ret < 0) 
    761709    { 
    762710        PVFS_perror("trove_initialize", ret); 
    763711        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    764         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     712        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    765713        return(-1); 
    766714    } 
     
    771719        fprintf(stderr, "Error: failed to lookup new collection.\n"); 
    772720        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    773         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     721        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    774722        return -1;  
    775723    }    
     
    789737        fprintf(stderr, "Error: failed to migrate collection extended attributes.\n"); 
    790738        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    791         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     739        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    792740        return(-1); 
    793741    } 
     
    800748        fprintf(stderr, "Error: failed to migrate dspace attributes.\n"); 
    801749        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    802         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     750        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    803751        return(-1); 
    804752    } 
     
    811759        fprintf(stderr, "Error: failed to migrate keyvals.\n"); 
    812760        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    813         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     761        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    814762        return(-1); 
    815763    } 
     
    822770    /* convert bstreams */ 
    823771    ret = translate_bstreams_0_0_1( 
    824         data_storage_space, old_coll_path, coll_id, coll_name, trove_context); 
     772        storage_space, old_coll_path, coll_id, coll_name, trove_context); 
    825773    if(ret < 0) 
    826774    { 
    827775        fprintf(stderr, "Error: failed to migrate bstreams.\n"); 
    828776        if(verbose) printf("VERBOSE Destroying temporary collection.\n"); 
    829         pvfs2_rmspace(data_storage_space, meta_storage_space, coll_name, coll_id, 1, 0); 
     777        pvfs2_rmspace(storage_space, coll_name, coll_id, 1, 0); 
    830778        return(-1); 
    831779    } 
     
    846794} 
    847795 
    848 static int remove_collection_entry(char* meta_storage_space, char* collname) 
     796static int remove_collection_entry(char* storage_space, char* collname) 
    849797{ 
    850798    char collections_db[PATH_MAX]; 
     
    854802    TROVE_coll_id coll_id; 
    855803 
    856     sprintf(collections_db, "%s/collections.db", meta_storage_space); 
     804    sprintf(collections_db, "%s/collections.db", storage_space); 
    857805 
    858806    ret = access(collections_db, F_OK); 
     
    15451493 */ 
    15461494static int translate_bstreams_0_0_1( 
    1547     char* data_storage_space,            /**< path to trove storage space */ 
     1495    char* storage_space,            /**< path to trove storage space */ 
    15481496    char* old_coll_path,            /**< path to old collection */ 
    15491497    TROVE_coll_id coll_id,          /**< collection id */ 
     
    15821530                    old_coll_path, i, tmp_ent->d_name); 
    15831531                snprintf(new_bstream_file, PATH_MAX, "%s/%08x/bstreams/%.8d/%s", 
    1584                     data_storage_space, coll_id, i, tmp_ent->d_name); 
     1532                    storage_space, coll_id, i, tmp_ent->d_name); 
    15851533                /* hard link to new location */ 
    15861534                ret = link(bstream_file, new_bstream_file); 
  • trunk/src/apps/admin/pvfs2-mkspace.c

    r7952 r7958  
    3232    char data_ranges[PATH_MAX]; 
    3333    char collection[PATH_MAX]; 
    34     char data_space[PATH_MAX]; 
    35     char meta_space[PATH_MAX]; 
     34    char storage_space[PATH_MAX]; 
    3635} options_t; 
    3736 
     
    5554        {"verbose",0,0,0}, 
    5655        {"defaults",0,0,0}, 
    57         {"data-space",1,0,0}, 
    58         {"meta-space",1,0,0}, 
     56        {"storage-space",1,0,0}, 
    5957        {"coll-id",1,0,0}, 
    6058        {"coll-name",1,0,0}, 
     
    7371    } 
    7472 
    75     while ((ret = getopt_long(argc, argv, "c:i:r:vVhadDM:N:", 
     73    while ((ret = getopt_long(argc, argv, "s:c:i:r:vVhadDM:N:", 
    7674                              long_opts, &option_index)) != -1) 
    7775    { 
     
    9391                    goto do_verbose; 
    9492                } 
    95                 else if (strcmp("data-space", cur_option) == 0) 
    96                 { 
    97                     strncpy(opts->data_space, optarg, PATH_MAX); 
    98                 } 
    99                                 else if (strcmp("meta-space", cur_option) == 0) 
    100                                 { 
    101                                 strncpy(opts->meta_space, optarg, PATH_MAX); 
    102                                 } 
     93                else if (strcmp("storage-space", cur_option) == 0) 
     94                { 
     95                    goto do_storage_space; 
     96                } 
    10397                else if (strcmp("coll-id", cur_option) == 0) 
    10498                { 
     
    179173          do_data_handle_range: 
    180174                strncpy(opts->data_ranges, optarg, PATH_MAX); 
     175                break; 
     176            case 's': 
     177          do_storage_space: 
     178                strncpy(opts->storage_space, optarg, PATH_MAX); 
    181179                break; 
    182180            case 'v': 
     
    226224               (strlen(opts->data_ranges) ? 
    227225                opts->data_ranges : "None specified")); 
    228         printf("\tdata storage space       : %s\n", 
    229                (strlen(opts->data_space) ? 
    230                 opts->data_space : "None specified")); 
    231                 printf("metadata storage space : %s\n", 
    232                         (strlen(opts->meta_space) ? 
    233                 opts->meta_space : "None specified")); 
     226        printf("\tstorage space       : %s\n", 
     227               (strlen(opts->storage_space) ? 
     228                opts->storage_space : "None specified")); 
    234229    } 
    235230} 
     
    264259            "create collection with the specified\n        " 
    265260            "                                data handle range\n"); 
    266     fprintf(stderr,"       --data-space=PATH             " 
    267             "create data storage space at this location\n"); 
    268     fprintf(stderr,"       --meta-space=PATH             " 
    269             "create metadata storage space at this location\n"); 
     261    fprintf(stderr,"  -s, --storage-space=PATH             " 
     262            "create storage space at this location\n"); 
    270263    fprintf(stderr,"  -v, --verbose                        " 
    271264            "operate in verbose mode\n"); 
     
    304297    print_options(&opts); 
    305298 
    306     if (strlen(opts.data_space) == 0) 
    307     { 
    308         fprintf(stderr, "Error: You MUST specify a data storage space\n"); 
    309         return -1; 
    310     } 
    311  
    312     if (strlen(opts.meta_space) == 0) 
    313     { 
    314         fprintf(stderr, "Error: You MUST specify a metadata storage space\n"); 
     299    if (strlen(opts.storage_space) == 0) 
     300    { 
     301        fprintf(stderr, "Error: You MUST specify a storage space\n"); 
    315302        return -1; 
    316303    } 
     
    332319    if (opts.delete_storage) 
    333320    { 
    334         ret = pvfs2_rmspace(opts.data_space, opts.meta_space, 
    335                             opts.collection, opts.coll_id,  
    336                             opts.collection_only, opts.verbose); 
     321        ret = pvfs2_rmspace(opts.storage_space, opts.collection, 
     322                            opts.coll_id, opts.collection_only, 
     323                            opts.verbose); 
    337324    } 
    338325    else 
    339326    { 
    340         ret = pvfs2_mkspace(opts.data_space, opts.meta_space, 
    341                             opts.collection, opts.coll_id,  
    342                             opts.root_handle, opts.meta_ranges,  
    343                             opts.data_ranges, opts.collection_only,  
    344                             opts.verbose); 
     327        ret = pvfs2_mkspace(opts.storage_space, opts.collection, 
     328                            opts.coll_id, opts.root_handle, 
     329                            opts.meta_ranges, opts.data_ranges, 
     330                            opts.collection_only, opts.verbose); 
    345331    } 
    346332    return ret; 
  • trunk/src/apps/admin/pvfs2-showcoll.c

    r7952 r7958  
    2424size_t strnlen(const char *s, size_t limit); 
    2525 
    26 static char data_path[PATH_MAX] = "/tmp/pvfs2-test-space"; 
    27 static char meta_path[PATH_MAX] = "/tmp/pvfs2-test-space"; 
     26static char storage_space[PATH_MAX] = "/tmp/pvfs2-test-space"; 
    2827static char collection[PATH_MAX]; 
    2928static int verbose = 0, got_collection = 0, print_keyvals = 0, got_dspace_handle = 0; 
     
    7372    /* initialize trove, verifying storage space exists */ 
    7473    ret = trove_initialize( 
    75       TROVE_METHOD_DBPF, NULL, data_path, meta_path, 0); 
     74        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    7675    if (ret < 0)  
    7776    { 
     
    8382 
    8483    if (verbose) fprintf(stderr, 
    85                          "%s: info: initialized with storage spaces '%s' and '%s'.\n", 
     84                         "%s: info: initialized with storage space '%s'.\n", 
    8685                         argv[0], 
    87                          data_path, meta_path); 
     86                         storage_space); 
    8887 
    8988    /* if no collection was specified, simply print out the collections and exit */ 
     
    166165    if (no_root_handle) { 
    167166        fprintf(stdout, 
    168                 "Storage space %s and %s, collection %s (coll_id = %d, " 
     167                "Storage space %s, collection %s (coll_id = %d, " 
    169168                "*** no root_handle found ***):\n", 
    170                 data_path, 
    171                 meta_path, 
     169                storage_space, 
    172170                collection, 
    173171                coll_id); 
     
    175173    else { 
    176174        fprintf(stdout, 
    177                 "Storage space %s and %s, collection %s (coll_id = %d, " 
     175                "Storage space %s, collection %s (coll_id = %d, " 
    178176                "root_handle = 0x%08llx):\n", 
    179                 data_path, 
    180                 meta_path, 
     177                storage_space, 
    181178                collection, 
    182179                coll_id, 
     
    204201    int c; 
    205202 
    206     while ((c = getopt(argc, argv, "s:m:c:d:kvh")) != EOF) { 
     203    while ((c = getopt(argc, argv, "s:c:d:kvh")) != EOF) { 
    207204        switch (c) { 
    208205            case 's': 
    209                 strncpy(data_path, optarg, PATH_MAX); 
     206                strncpy(storage_space, optarg, PATH_MAX); 
    210207                break; 
    211             case 'm': 
    212                 strncpy(meta_path, optarg, PATH_MAX); 
    213208            case 'c': /* collection */ 
    214209                got_collection = 1; 
     
    230225            case 'h': 
    231226                fprintf(stderr, 
    232                         "usage: pvfs2-showcoll [-s data_storage_space] [-m metadata storage space] [-c collection_name] [-d dspace_handle] [-v] [-k] [-h]\n"); 
     227                        "usage: pvfs2-showcoll [-s storage_space] [-c collection_name] [-d dspace_handle] [-v] [-k] [-h]\n"); 
    233228                fprintf(stderr, "\tdefault storage space is '/tmp/pvfs2-test-space'.\n"); 
    234229                fprintf(stderr, "\t'-v' turns on verbose output.\n"); 
     
    504499    pos = TROVE_ITERATE_START; 
    505500 
    506     fprintf(stdout, "Storage space %s and %s collections:\n", 
    507             data_path, meta_path); 
     501    fprintf(stdout, "Storage space %s collections:\n", storage_space); 
    508502 
    509503    while (count > 0) { 
  • trunk/src/common/misc/mkspace.c

    r7952 r7958  
    112112 
    113113int pvfs2_mkspace( 
    114     char *data_path, 
    115     char *meta_path, 
     114    char *storage_space, 
    116115    char *collection, 
    117116    TROVE_coll_id coll_id, 
     
    136135    TROVE_handle lost_and_found_dirdata_handle = TROVE_HANDLE_NULL; 
    137136 
    138     mkspace_print(verbose,"Data storage space     : %s\n",data_path); 
    139     mkspace_print(verbose,"Metadata storage space : %s\n", meta_path); 
     137    mkspace_print(verbose,"Storage space: %s\n",storage_space); 
    140138    mkspace_print(verbose,"Collection   : %s\n",collection); 
    141139    mkspace_print(verbose,"ID           : %d\n",coll_id); 
     
    162160        ret = trove_initialize(TROVE_METHOD_DBPF,  
    163161                               NULL,  
    164                                data_path, 
    165                                meta_path, 
     162                               storage_space,  
    166163                               0); 
    167164        if (ret > -1) 
    168165        { 
    169             gossip_err("error: storage space %s or %s already " 
    170                        "exists; aborting!\n",data_path,meta_path); 
    171             return -1; 
    172         } 
    173  
    174         ret = trove_storage_create(TROVE_METHOD_DBPF, data_path, meta_path, NULL, &op_id); 
     166            gossip_err("error: storage space %s already " 
     167                       "exists; aborting!\n",storage_space); 
     168            return -1; 
     169        } 
     170 
     171        ret = trove_storage_create(TROVE_METHOD_DBPF, storage_space, NULL, &op_id); 
    175172        if (ret != 1) 
    176173        { 
     
    183180    ret = trove_initialize( 
    184181        TROVE_METHOD_DBPF, NULL,  
    185         data_path, meta_path, 0); 
     182        storage_space, 0); 
    186183    if (ret < 0) 
    187184    { 
     
    190187    } 
    191188 
    192     mkspace_print(verbose,"info: created data storage space '%s'.\n", 
    193                   data_path); 
    194     mkspace_print(verbose,"info: created metadata storage space '%s'.\n", 
    195                   meta_path); 
     189    mkspace_print(verbose,"info: created storage space '%s'.\n", 
     190                  storage_space); 
    196191 
    197192    /* try to look up collection used to store file system */ 
     
    642637 
    643638int pvfs2_rmspace( 
    644     char *data_path, 
    645     char *meta_path, 
     639    char *storage_space, 
    646640    char *collection, 
    647641    TROVE_coll_id coll_id, 
     
    658652        ret = trove_initialize( 
    659653            TROVE_METHOD_DBPF, NULL, 
    660             data_path, meta_path, 0); 
     654            storage_space, 0); 
    661655        if (ret == -1) 
    662656        { 
    663             gossip_err("error: storage space %s or %s does not " 
    664                        "exist; aborting!\n", data_path, meta_path); 
     657            gossip_err("error: storage space %s does not " 
     658                       "exist; aborting!\n", storage_space); 
    665659            return -1; 
    666660        } 
     
    680674    if (!remove_collection_only) 
    681675    { 
    682         ret = trove_storage_remove(TROVE_METHOD_DBPF, data_path, meta_path,  
    683                                   NULL, &op_id); 
     676        ret = trove_storage_remove( 
     677            TROVE_METHOD_DBPF, storage_space, NULL, &op_id); 
    684678        /* 
    685679         * it is a bit weird to do a trove_finaliz() prior to blowing away 
     
    689683        trove_finalize(TROVE_METHOD_DBPF); 
    690684        mkspace_print( 
    691             verbose, "PVFS2 Storage Space %s and %s removed %s\n", 
    692             data_path, meta_path, (((ret == 1) || (ret == -TROVE_ENOENT)) ? 
     685            verbose, "PVFS2 Storage Space %s removed %s\n", 
     686            storage_space, (((ret == 1) || (ret == -TROVE_ENOENT)) ? 
    693687                            "successfully" : "with errors")); 
    694688 
  • trunk/src/common/misc/mkspace.h

    r7952 r7958  
    1414 
    1515int pvfs2_mkspace( 
    16     char *data_path, 
    17     char *meta_path, 
     16    char *storage_space, 
    1817    char *collection, 
    1918    TROVE_coll_id coll_id, 
     
    2524 
    2625int pvfs2_rmspace( 
    27     char *data_path, 
    28     char *meta_path, 
     26    char *storage_space, 
    2927    char *collection, 
    3028    TROVE_coll_id coll_id, 
  • trunk/src/common/misc/server-config.c

    r7952 r7958  
    3535 
    3636static DOTCONF_CB(get_logstamp); 
    37 static DOTCONF_CB(get_data_path); 
    38 static DOTCONF_CB(get_meta_path); 
     37static DOTCONF_CB(get_storage_space); 
    3938static DOTCONF_CB(enter_defaults_context); 
    4039static DOTCONF_CB(exit_defaults_context); 
     
    552551         CTX_DEFAULTS|CTX_SERVER_OPTIONS,"50"}, 
    553552 
    554     /* Specifies the local path for the pvfs2 server to use as storage space  
    555      * for data files. This option specifies the default path for all servers  
    556      * and will appear in the Defaults context. 
     553    /* Specifies the local path for the pvfs2 server to use as storage space. 
     554     * This option specifies the default path for all servers and will appear 
     555     * in the Defaults context. 
    557556     * 
    558557     * NOTE: This can be overridden in the <ServerOptions> tag on a per-server 
     
    560559     * Example: 
    561560     * 
    562      * DataStorageSpace /tmp/pvfs-data.storage 
    563      */ 
    564     {"DataStorageSpace",ARG_STR, get_data_path,NULL, 
    565         CTX_DEFAULTS|CTX_SERVER_OPTIONS,NULL}, 
    566  
    567     /* Specifies the local path for the pvfs2 server to use as storage space  
    568      * for metadata files. This option specifies the default path for all  
    569      * servers and will appear in the Defaults context. 
    570      * 
    571      * NOTE: This can be overridden in the <ServerOptions> tag on a per-server 
    572      * basis. Look at the "Option" tag for more details 
    573      * Example: 
    574      * 
    575      * MetadataStorageSpace /tmp/pvfs-meta.storage 
    576      */ 
    577     {"MetadataStorageSpace",ARG_STR, get_meta_path,NULL, 
     561     * StorageSpace /tmp/pvfs.storage 
     562     */ 
     563    {"StorageSpace",ARG_STR, get_storage_space,NULL, 
    578564        CTX_DEFAULTS|CTX_SERVER_OPTIONS,NULL}, 
    579565 
     
    10631049    } 
    10641050 
    1065     if (server_alias_name && !config_s->data_path) 
     1051    if (server_alias_name && !config_s->storage_path) 
    10661052    { 
    10671053        gossip_err("Configuration file error. " 
    1068                    "No data storage path specified for alias %s.\n", server_alias_name); 
    1069         return 1; 
    1070     } 
    1071  
    1072     if (server_alias_name && !config_s->meta_path) 
    1073     { 
    1074         gossip_err("Configuration file error. " 
    1075                    "No metadata storage path specified for alias %s.\n", server_alias_name); 
     1054                   "No storage path specified for alias %s.\n", server_alias_name); 
    10761055        return 1; 
    10771056    } 
     
    11571136 
    11581137 
    1159 DOTCONF_CB(get_data_path) 
     1138DOTCONF_CB(get_storage_space) 
    11601139{ 
    11611140    struct server_configuration_s *config_s =  
     
    11661145        return NULL; 
    11671146    } 
    1168     if (config_s->data_path) 
    1169     { 
    1170         free(config_s->data_path); 
    1171     } 
    1172     config_s->data_path = 
    1173         (cmd->data.str ? strdup(cmd->data.str) : NULL); 
    1174     return NULL; 
    1175 } 
    1176  
    1177 DOTCONF_CB(get_meta_path) 
    1178 { 
    1179     struct server_configuration_s *config_s =  
    1180         (struct server_configuration_s *)cmd->context; 
    1181     if(config_s->configuration_context == CTX_SERVER_OPTIONS && 
    1182        config_s->my_server_options == 0) 
    1183     { 
    1184         return NULL; 
    1185     } 
    1186     if (config_s->meta_path) 
    1187     { 
    1188         free(config_s->meta_path); 
    1189     } 
    1190     config_s->meta_path = 
     1147    if (config_s->storage_path) 
     1148    { 
     1149        free(config_s->storage_path); 
     1150    } 
     1151    config_s->storage_path = 
    11911152        (cmd->data.str ? strdup(cmd->data.str) : NULL); 
    11921153    return NULL; 
     
    28772838        } 
    28782839 
    2879         if (config_s->data_path) 
    2880         { 
    2881             free(config_s->data_path); 
    2882             config_s->data_path = NULL; 
    2883         } 
    2884  
    2885         if (config_s->meta_path) 
    2886         { 
    2887             free(config_s->meta_path); 
    2888             config_s->meta_path = NULL; 
     2840        if (config_s->storage_path) 
     2841        { 
     2842            free(config_s->storage_path); 
     2843            config_s->storage_path = NULL; 
    28892844        } 
    28902845 
     
    43864341 
    43874342            ret = pvfs2_mkspace( 
    4388                 config->data_path, config->meta_path, cur_fs->file_system_name, 
     4343                config->storage_path, cur_fs->file_system_name, 
    43894344                cur_fs->coll_id, root_handle, cur_meta_handle_range, 
    43904345                cur_data_handle_range, create_collection_only, 1); 
     
    44414396                (remove_collection_only ? "collection" : 
    44424397                 "storage space")); 
    4443             ret = pvfs2_rmspace(config->data_path, 
    4444                                 config->meta_path, 
     4398            ret = pvfs2_rmspace(config->storage_path, 
    44454399                                cur_fs->file_system_name, 
    44464400                                cur_fs->coll_id, 
  • trunk/src/common/misc/server-config.h

    r7952 r7958  
    146146    char *server_alias;             /* the command line server-alias parameter */ 
    147147    int my_server_options; 
    148     char *data_path;                /* path to data storage directory */ 
    149     char *meta_path;                /* path to metadata storage directory */ 
     148    char *storage_path; 
    150149    char *fs_config_filename;       /* the fs.conf file name            */ 
    151150    size_t fs_config_buflen;        /* the fs.conf file length          */ 
  • trunk/src/io/trove/trove-dbpf/dbpf-dspace.c

    r7952 r7958  
    21162116     * somehow 
    21172117     */ 
    2118     DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX, my_storage_p->data_path, 
     2118    DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX, my_storage_p->name, 
    21192119                              coll_p->coll_id, llu(new_handle)); 
    21202120    ret = access(filename, F_OK); 
     
    21292129         
    21302130        DBPF_GET_STRANDED_BSTREAM_FILENAME(new_filename, PATH_MAX, 
    2131                                            my_storage_p->data_path,  
     2131                                           my_storage_p->name,  
    21322132                                           coll_p->coll_id, 
    21332133                                           llu(new_handle)); 
  • trunk/src/io/trove/trove-dbpf/dbpf-mgmt.c

    r7952 r7958  
    292292} 
    293293 
    294 static int dbpf_db_create(char *dbname,  
     294static int dbpf_db_create(const char *sto_path,  
     295                          char *dbname,  
    295296                          DB_ENV *envp,  
    296297                          uint32_t flags); 
    297298static DB *dbpf_db_open( 
    298     char *dbname, DB_ENV *envp, int *err_p, 
     299    const char *sto_path, char *dbname, DB_ENV *envp, int *err_p, 
    299300    int (*compare_fn) (DB *db, const DBT *dbt1, const DBT *dbt2), uint32_t flags); 
    300301static int dbpf_mkpath(char *pathname, mode_t mode); 
     
    329330                TROVE_statfs *tmp_trove_statfs = (TROVE_statfs *)parameter; 
    330331 
    331                 /* XXX: this is not entirely accurate when data and metadata 
    332                                 * are stored on different devices. 
    333                                 */ 
    334                 DBPF_GET_DATA_DIRNAME(path_name, PATH_MAX, sto_p->data_path); 
     332                DBPF_GET_STORAGE_DIRNAME(path_name, PATH_MAX, sto_p->name); 
    335333                ret = PINT_statfs_lookup(path_name, &tmp_statfs); 
    336334                if (ret < 0) 
     
    572570} 
    573571 
    574 static int dbpf_initialize(char *data_path, 
    575                            char *meta_path, 
     572static int dbpf_initialize(char *stoname, 
    576573                           TROVE_ds_flags flags) 
    577574{ 
     
    672669    dbpf_pid = getpid(); 
    673670 
    674     if (!data_path) 
    675     { 
    676         gossip_err("dbpf_initialize failure: invalid data storage path\n"); 
     671    if (!stoname) 
     672    { 
     673        gossip_err("dbpf_initialize failure: invalid storage name\n"); 
    677674        return ret; 
    678675    } 
    679676 
    680     if (!meta_path) 
    681     { 
    682         gossip_err("dbpf_initialize failure: invalid metadata storage path\n"); 
    683         return ret; 
    684     } 
    685  
    686     sto_p = dbpf_storage_lookup(data_path, meta_path, &ret, flags); 
     677    sto_p = dbpf_storage_lookup(stoname, &ret, flags); 
    687678    if (sto_p == NULL) 
    688679    { 
     
    777768} 
    778769 
    779 static int dbpf_direct_initialize(char *data_path, 
    780                                   char *meta_path, 
    781                                   TROVE_ds_flags flags) 
     770static int dbpf_direct_initialize(char *stoname, TROVE_ds_flags flags) 
    782771{ 
    783772    int ret; 
    784773 
    785774    /* some parts of initialization are shared with other methods */ 
    786     ret = dbpf_initialize(data_path, meta_path, flags); 
     775    ret = dbpf_initialize(stoname, flags); 
    787776    if(ret < 0) 
    788777    { 
     
    848837        } 
    849838 
    850         free(my_storage_p->data_path); 
    851         free(my_storage_p->meta_path); 
     839        free(my_storage_p->name); 
    852840        free(my_storage_p); 
    853841        my_storage_p = NULL; 
     
    863851 * - creating collections database, filling in create time 
    864852 */ 
    865 int dbpf_storage_create(char *data_path, 
    866                         char *meta_path, 
     853int dbpf_storage_create(char *stoname, 
    867854                        void *user_ptr, 
    868855                        TROVE_op_id *out_op_id_p) 
    869856{ 
    870857    int ret = -TROVE_EINVAL; 
    871     char data_dirname[PATH_MAX] = {0}; 
    872     char meta_dirname[PATH_MAX] = {0}; 
     858    char storage_dirname[PATH_MAX] = {0}; 
    873859    char sto_attrib_dbname[PATH_MAX] = {0}; 
    874860    char collections_dbname[PATH_MAX] = {0}; 
    875861 
    876     DBPF_GET_DATA_DIRNAME(data_dirname, PATH_MAX, data_path); 
    877     ret = dbpf_mkpath(data_dirname, 0755); 
     862    DBPF_GET_STORAGE_DIRNAME(storage_dirname, PATH_MAX, stoname); 
     863    ret = dbpf_mkpath(storage_dirname, 0755); 
    878864    if (ret != 0) 
    879865    { 
     
    881867    } 
    882868 
    883     DBPF_GET_META_DIRNAME(meta_dirname, PATH_MAX, meta_path); 
    884     ret = dbpf_mkpath(meta_dirname, 0755); 
     869    DBPF_GET_STO_ATTRIB_DBNAME(sto_attrib_dbname, PATH_MAX, stoname); 
     870    ret = dbpf_db_create(storage_dirname, sto_attrib_dbname, NULL, 0); 
    885871    if (ret != 0) 
    886872    { 
    887         return ret; 
    888     } 
    889  
    890     DBPF_GET_STO_ATTRIB_DBNAME(sto_attrib_dbname, PATH_MAX, meta_path); 
    891     ret = dbpf_db_create(sto_attrib_dbname, NULL, 0); 
    892     if (ret != 0) 
    893     { 
    894873        return ret; 
    895874    } 
    896875 
    897     DBPF_GET_COLLECTIONS_DBNAME(collections_dbname, PATH_MAX, meta_path); 
    898     ret = dbpf_db_create(collections_dbname, NULL, DB_RECNUM); 
     876    DBPF_GET_COLLECTIONS_DBNAME(collections_dbname, PATH_MAX, stoname); 
     877    ret = dbpf_db_create(storage_dirname, collections_dbname, NULL, DB_RECNUM); 
    899878    if (ret != 0) 
    900879    { 
     
    907886} 
    908887 
    909 int dbpf_storage_remove(char *data_path, 
    910                         char *meta_path, 
    911             void *user_ptr, 
    912             TROVE_op_id *out_op_id_p) 
     888int dbpf_storage_remove(char *stoname, 
     889                        void *user_ptr, 
     890                        TROVE_op_id *out_op_id_p) 
    913891{ 
    914892    int ret = -TROVE_EINVAL; 
     
    918896        db_close(my_storage_p->sto_attr_db); 
    919897        db_close(my_storage_p->coll_db); 
    920                 free(my_storage_p->meta_path); 
    921                 free(my_storage_p->data_path); 
     898        free(my_storage_p->name); 
    922899        free(my_storage_p); 
    923900        my_storage_p = NULL; 
    924901    } 
    925      
    926     DBPF_GET_STO_ATTRIB_DBNAME(path_name, PATH_MAX, meta_path); 
     902    DBPF_GET_STO_ATTRIB_DBNAME(path_name, PATH_MAX, stoname); 
    927903    gossip_debug(GOSSIP_TROVE_DEBUG, "Removing %s\n", path_name); 
    928904 
     
    933909    } 
    934910 
    935     DBPF_GET_COLLECTIONS_DBNAME(path_name, PATH_MAX, meta_path); 
     911    DBPF_GET_COLLECTIONS_DBNAME(path_name, PATH_MAX, stoname); 
    936912    gossip_debug(GOSSIP_TROVE_DEBUG, "Removing %s\n", path_name); 
    937913 
     
    942918    } 
    943919 
    944     DBPF_GET_META_DIRNAME(path_name, PATH_MAX, meta_path); 
     920    DBPF_GET_STORAGE_DIRNAME(path_name, PATH_MAX, stoname); 
    945921    gossip_debug(GOSSIP_TROVE_DEBUG, "Removing %s\n", path_name); 
    946922    if (rmdir(path_name) != 0) 
    947923    { 
    948                 perror("failure removing metadata directory"); 
    949                 ret = -trove_errno_to_trove_error(errno); 
    950                 goto storage_remove_failure; 
    951     } 
    952  
    953     DBPF_GET_DATA_DIRNAME(path_name, PATH_MAX, data_path); 
    954     gossip_debug(GOSSIP_TROVE_DEBUG, "Removing %s\n", path_name); 
    955     if (rmdir(path_name) != 0) 
    956     { 
    957         perror("failure removing data directory"); 
     924        perror("failure removing storage space"); 
    958925        ret = -trove_errno_to_trove_error(errno); 
    959926        goto storage_remove_failure; 
     
    10421009    } 
    10431010 
    1044     DBPF_GET_DATA_DIRNAME(path_name, PATH_MAX, sto_p->data_path); 
     1011    DBPF_GET_STORAGE_DIRNAME(path_name, PATH_MAX, sto_p->name); 
    10451012    ret = stat(path_name, &dirstat); 
    10461013    if (ret < 0 && errno != ENOENT) 
    10471014    { 
    1048         gossip_err("stat failed on data directory %s\n", path_name); 
     1015        gossip_err("stat failed on storage directory %s\n", path_name); 
    10491016        return -trove_errno_to_trove_error(errno); 
    10501017    } 
     
    10541021        if (ret != 0) 
    10551022        { 
    1056             gossip_err("mkdir failed on data directory %s\n", path_name); 
     1023            gossip_err("mkdir failed on storage directory %s\n", path_name); 
    10571024            return -trove_errno_to_trove_error(errno); 
    10581025        } 
    10591026    } 
    10601027 
    1061     DBPF_GET_META_DIRNAME(path_name, PATH_MAX, sto_p->meta_path); 
    1062     ret = stat(path_name, &dirstat); 
    1063     if (ret < 0 && errno != ENOENT) 
    1064     { 
    1065                 gossip_err("stat failed on metadata directory %s\n", path_name); 
    1066                 return -trove_errno_to_trove_error(errno); 
    1067     } 
    1068     else if (ret < 0) 
    1069     { 
    1070                 ret = mkdir(path_name, 0755); 
    1071                 if (ret != 0) 
    1072                 { 
    1073                 gossip_err("mkdir failed on metadata directory %s\n", path_name); 
    1074                 return -trove_errno_to_trove_error(errno); 
    1075                 } 
    1076     } 
    1077  
    1078  
    1079     DBPF_GET_COLL_DIRNAME(path_name, PATH_MAX, sto_p->data_path, new_coll_id); 
     1028    DBPF_GET_COLL_DIRNAME(path_name, PATH_MAX, sto_p->name, new_coll_id); 
    10801029    ret = mkdir(path_name, 0755); 
    10811030    if (ret != 0) 
    10821031    { 
    1083         gossip_err("mkdir failed on data collection directory %s\n",  
    1084                    path_name); 
     1032        gossip_err("mkdir failed on collection directory %s\n", path_name); 
    10851033        return -trove_errno_to_trove_error(errno); 
    10861034    } 
    10871035 
    1088     DBPF_GET_COLL_DIRNAME(path_name, PATH_MAX, sto_p->meta_path, new_coll_id); 
    1089     ret = mkdir(path_name, 0755); 
    1090     if (ret != 0) 
    1091     { 
    1092         gossip_err("mkdir failed on metadata collection directory %s\n", 
    1093                    path_name); 
    1094         return -trove_errno_to_trove_error(errno); 
    1095     } 
    1096  
    10971036    DBPF_GET_COLL_ATTRIB_DBNAME(path_name, PATH_MAX, 
    1098                                 sto_p->meta_path, new_coll_id); 
     1037                                sto_p->name, new_coll_id); 
    10991038 
    11001039    ret = stat(path_name, &dbstat); 
     
    11061045    else if(ret < 0) 
    11071046    { 
    1108         ret = dbpf_db_create(path_name, NULL, 0); 
     1047        ret = dbpf_db_create(sto_p->name, path_name, NULL, 0); 
    11091048        if (ret != 0) 
    11101049        { 
     
    11141053    } 
    11151054 
    1116     db_p = dbpf_db_open(path_name, NULL, &error, NULL, 0); 
     1055    db_p = dbpf_db_open(sto_p->name, path_name, NULL, &error, NULL, 0); 
    11171056    if (db_p == NULL) 
    11181057    { 
     
    11621101    db_close(db_p); 
    11631102 
    1164     DBPF_GET_DS_ATTRIB_DBNAME(path_name, PATH_MAX, sto_p->meta_path,  
    1165                               new_coll_id); 
     1103    DBPF_GET_DS_ATTRIB_DBNAME(path_name, PATH_MAX, sto_p->name, new_coll_id); 
    11661104    ret = stat(path_name, &dbstat); 
    11671105    if(ret < 0 && errno != ENOENT) 
     
    11721110    if(ret < 0) 
    11731111    { 
    1174         ret = dbpf_db_create(path_name, NULL, 0); 
     1112        ret = dbpf_db_create(sto_p->name, path_name, NULL, 0); 
    11751113        if (ret != 0) 
    11761114        { 
     
    11801118    } 
    11811119 
    1182     DBPF_GET_KEYVAL_DBNAME(path_name, PATH_MAX, sto_p->meta_path, new_coll_id); 
     1120    DBPF_GET_KEYVAL_DBNAME(path_name, PATH_MAX, sto_p->name, new_coll_id); 
    11831121    ret = stat(path_name, &dbstat); 
    11841122    if(ret < 0 && errno != ENOENT) 
     
    11891127    if(ret < 0) 
    11901128    { 
    1191         ret = dbpf_db_create(path_name, NULL, 0); 
     1129        ret = dbpf_db_create(sto_p->name, path_name, NULL, 0); 
    11921130        if (ret != 0) 
    11931131        { 
     
    11971135    } 
    11981136 
    1199     DBPF_GET_BSTREAM_DIRNAME(path_name, PATH_MAX, sto_p->data_path, 
    1200                              new_coll_id); 
     1137    DBPF_GET_BSTREAM_DIRNAME(path_name, PATH_MAX, sto_p->name, new_coll_id); 
    12011138    ret = mkdir(path_name, 0755); 
    12021139    if(ret != 0) 
     
    12171154    } 
    12181155 
    1219     DBPF_GET_STRANDED_BSTREAM_DIRNAME(path_name, PATH_MAX, sto_p->data_path, 
     1156    DBPF_GET_STRANDED_BSTREAM_DIRNAME(path_name, PATH_MAX, sto_p->name, 
    12201157                                      new_coll_id); 
    12211158    ret = mkdir(path_name, 0755); 
     
    12951232        db_close(db_collection->keyval_db); 
    12961233        /* so that environment can also be cleaned up */ 
    1297         dbpf_putdb_env(db_collection->coll_env, db_collection->meta_path); 
     1234        dbpf_putdb_env(db_collection->coll_env, db_collection->path_name); 
    12981235        dbpf_collection_deregister(db_collection); 
    12991236        free(db_collection->name); 
    1300         free(db_collection->meta_path); 
    1301                 free(db_collection->data_path); 
     1237        free(db_collection->path_name); 
    13021238        PINT_dbpf_keyval_pcache_finalize(db_collection->pcache); 
    13031239        free(db_collection); 
     
    13051241 
    13061242    DBPF_GET_DS_ATTRIB_DBNAME(path_name, PATH_MAX, 
    1307                               sto_p->meta_path, db_data.coll_id); 
     1243                              sto_p->name, db_data.coll_id); 
    13081244    if (unlink(path_name) != 0) 
    13091245    { 
     
    13131249 
    13141250    DBPF_GET_KEYVAL_DBNAME(path_name, PATH_MAX, 
    1315                            sto_p->meta_path, db_data.coll_id); 
     1251                           sto_p->name, db_data.coll_id); 
    13161252    if(unlink(path_name) != 0) 
    13171253    { 
     
    13211257 
    13221258    DBPF_GET_COLL_ATTRIB_DBNAME(path_name, PATH_MAX, 
    1323                                 sto_p->meta_path, db_data.coll_id); 
     1259                                sto_p->name, db_data.coll_id); 
    13241260    if (unlink(path_name) != 0) 
    13251261    { 
     
    13291265 
    13301266    DBPF_GET_BSTREAM_DIRNAME(path_name, PATH_MAX, 
    1331                              sto_p->data_path, db_data.coll_id); 
     1267                             sto_p->name, db_data.coll_id); 
    13321268    for(i = 0; i < DBPF_BSTREAM_MAX_NUM_BUCKETS; i++) 
    13331269    { 
     
    13751311 
    13761312    DBPF_GET_STRANDED_BSTREAM_DIRNAME(path_name, PATH_MAX, 
    1377                                       sto_p->data_path, db_data.coll_id); 
     1313                                      sto_p->name, db_data.coll_id); 
    13781314 
    13791315    /* remove stranded bstreams directory */ 
     
    14181354 
    14191355    DBPF_GET_COLL_DIRNAME(path_name, PATH_MAX, 
    1420                           sto_p->meta_path, db_data.coll_id); 
     1356                          sto_p->name, db_data.coll_id); 
    14211357    if (rmdir(path_name) != 0) 
    14221358    { 
    1423                 gossip_err("failure removing metadata collection directory\n"); 
    1424                 ret = -trove_errno_to_trove_error(errno); 
    1425                 goto collection_remove_failure; 
    1426     } 
    1427  
    1428     DBPF_GET_COLL_DIRNAME(path_name, PATH_MAX, 
    1429                           sto_p->data_path, db_data.coll_id); 
    1430     if (rmdir(path_name) != 0) 
    1431     { 
    1432         gossip_err("failure removing data collection directory\n"); 
     1359        gossip_err("failure removing collection directory\n"); 
    14331360        ret = -trove_errno_to_trove_error(errno); 
    14341361    } 
     
    16511578    } 
    16521579 
    1653     dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
     1580    dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
    16541581    free(coll_p->name); 
    1655     free(coll_p->data_path); 
    1656     free(coll_p->meta_path); 
     1582    free(coll_p->path_name); 
    16571583    PINT_dbpf_keyval_pcache_finalize(coll_p->pcache); 
    16581584 
     
    17621688        return -TROVE_ENOMEM; 
    17631689    } 
    1764     /* Path to data collection dir */ 
    1765     snprintf(path_name, PATH_MAX, "/%s/%08x/", sto_p->data_path,  
    1766              coll_p->coll_id); 
    1767     coll_p->data_path = strdup(path_name); 
    1768     if (!coll_p->data_path)  
     1690    /* Path to collection */ 
     1691    snprintf(path_name, PATH_MAX, "/%s/%08x/", sto_p->name, coll_p->coll_id); 
     1692    coll_p->path_name = strdup(path_name); 
     1693    if (!coll_p->path_name)  
    17691694    { 
    17701695        free(coll_p->name); 
     
    17721697        return -TROVE_ENOMEM; 
    17731698    } 
    1774  
    1775     snprintf(path_name, PATH_MAX, "/%s/%08x/",  
    1776              sto_p->meta_path, coll_p->coll_id); 
    1777     coll_p->meta_path = strdup(path_name); 
    1778     if (!coll_p->meta_path) 
    1779     { 
    1780         free(coll_p->data_path); 
    1781         free(coll_p->name); 
    1782         free(coll_p); 
    1783         return -TROVE_ENOMEM; 
    1784     } 
    1785  
    1786     if ((coll_p->coll_env = dbpf_getdb_env(coll_p->meta_path, COLL_ENV_FLAGS, &ret)) == NULL)  
    1787     { 
    1788         free(coll_p->meta_path); 
    1789         free(coll_p->data_path); 
     1699    /* per-collection environment */ 
     1700    if ((coll_p->coll_env = dbpf_getdb_env(coll_p->path_name, COLL_ENV_FLAGS, &ret)) == NULL)  
     1701    { 
     1702        free(coll_p->path_name); 
    17901703        free(coll_p->name); 
    17911704        free(coll_p); 
     
    17941707 
    17951708    DBPF_GET_COLL_ATTRIB_DBNAME(path_name, PATH_MAX, 
    1796                                 sto_p->meta_path, coll_p->coll_id); 
    1797      
    1798     coll_p->coll_attr_db = dbpf_db_open(path_name, coll_p->coll_env, 
     1709                                sto_p->name, coll_p->coll_id); 
     1710    coll_p->coll_attr_db = dbpf_db_open(sto_p->name, path_name, coll_p->coll_env, 
    17991711                                        &ret, NULL, 0); 
    18001712    if (coll_p->coll_attr_db == NULL) 
    18011713    { 
    1802         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1803         free(coll_p->meta_path); 
    1804         free(coll_p->data_path); 
     1714        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1715        free(coll_p->path_name); 
    18051716        free(coll_p->name); 
    18061717        free(coll_p); 
     
    18261737                   db_strerror(ret)); 
    18271738        db_close(coll_p->coll_attr_db); 
    1828         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1829         free(coll_p->meta_path); 
    1830         free(coll_p->data_path); 
     1739        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1740        free(coll_p->path_name); 
    18311741        free(coll_p->name); 
    18321742        free(coll_p); 
     
    18701780    { 
    18711781        db_close(coll_p->coll_attr_db); 
    1872         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1873         free(coll_p->meta_path); 
    1874                 free(coll_p->data_path); 
     1782        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1783        free(coll_p->path_name); 
    18751784        free(coll_p->name); 
    18761785        free(coll_p); 
     
    18841793 
    18851794    DBPF_GET_DS_ATTRIB_DBNAME(path_name, PATH_MAX, 
    1886                               sto_p->meta_path, coll_p->coll_id); 
     1795                              sto_p->name, coll_p->coll_id); 
    18871796 
    18881797    if(sto_major == 0 && sto_minor == 1 && sto_inc < 3) 
     
    18901799        /* use old comparison function */ 
    18911800        coll_p->ds_db = dbpf_db_open( 
    1892             path_name, coll_p->coll_env, &ret, 
     1801            sto_p->name, path_name, coll_p->coll_env, &ret, 
    18931802            &PINT_trove_dbpf_ds_attr_compare_reversed, 0); 
    18941803    } 
     
    18991808         */ 
    19001809        coll_p->ds_db = dbpf_db_open( 
    1901             path_name, coll_p->coll_env, &ret, 
     1810            sto_p->name, path_name, coll_p->coll_env, &ret, 
    19021811            &PINT_trove_dbpf_ds_attr_compare, 0); 
    19031812    } 
     
    19061815    { 
    19071816        db_close(coll_p->coll_attr_db); 
    1908         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1909         free(coll_p->meta_path); 
    1910                 free(coll_p->data_path); 
     1817        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1818        free(coll_p->path_name); 
    19111819        free(coll_p->name); 
    19121820        free(coll_p); 
     
    19151823 
    19161824    DBPF_GET_KEYVAL_DBNAME(path_name, PATH_MAX, 
    1917                            sto_p->meta_path, coll_p->coll_id); 
    1918  
    1919     coll_p->keyval_db = dbpf_db_open(path_name, coll_p->coll_env, 
     1825                           sto_p->name, coll_p->coll_id); 
     1826    coll_p->keyval_db = dbpf_db_open(sto_p->name, path_name, coll_p->coll_env, 
    19201827                                     &ret, PINT_trove_dbpf_keyval_compare, 0); 
    19211828    if(coll_p->keyval_db == NULL) 
     
    19231830        db_close(coll_p->coll_attr_db); 
    19241831        db_close(coll_p->ds_db); 
    1925         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1926         free(coll_p->meta_path); 
    1927                 free(coll_p->data_path); 
     1832        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1833        free(coll_p->path_name); 
    19281834        free(coll_p->name); 
    19291835        free(coll_p); 
     
    19371843        db_close(coll_p->keyval_db); 
    19381844        db_close(coll_p->ds_db); 
    1939         dbpf_putdb_env(coll_p->coll_env, coll_p->meta_path); 
    1940         free(coll_p->meta_path); 
    1941                 free(coll_p->data_path); 
     1845        dbpf_putdb_env(coll_p->coll_env, coll_p->path_name); 
     1846        free(coll_p->path_name); 
    19421847        free(coll_p->name); 
    19431848        free(coll_p); 
     
    19771882 */ 
    19781883struct dbpf_storage *dbpf_storage_lookup( 
    1979     char *data_path, char *meta_path, int *error_p, TROVE_ds_flags flags) 
     1884    char *stoname, int *error_p, TROVE_ds_flags flags) 
    19801885{ 
    19811886    char path_name[PATH_MAX] = {0}; 
     
    19881893    } 
    19891894 
    1990     if (stat(data_path, &sbuf) < 0)  
     1895    if (stat(stoname, &sbuf) < 0)  
    19911896    { 
    19921897        *error_p = -TROVE_ENOENT; 
     
    19961901    { 
    19971902        *error_p = -TROVE_EINVAL; 
    1998         gossip_err("%s is not a directory\n", data_path); 
     1903        gossip_err("%s is not a directory\n", stoname); 
    19991904        return NULL; 
    2000     } 
    2001  
    2002     if (stat(meta_path, &sbuf) < 0) 
    2003     { 
    2004         *error_p = -TROVE_ENOENT; 
    2005         return NULL; 
    2006     } 
    2007     if (!S_ISDIR(sbuf.st_mode)) 
    2008     { 
    2009         *error_p = -TROVE_EINVAL; 
    2010         gossip_err("%s is not a directory\n", meta_path); 
    2011         return NULL; 
    20121905    } 
    20131906 
     
    20201913    memset(sto_p, 0, sizeof(struct dbpf_storage)); 
    20211914 
    2022     sto_p->data_path = strdup(data_path); 
    2023     if (sto_p->data_path == NULL) 
     1915    sto_p->name = strdup(stoname); 
     1916    if (sto_p->name == NULL) 
    20241917    { 
    20251918        free(sto_p); 
     
    20271920        return NULL; 
    20281921    } 
    2029     sto_p->meta_path = strdup(meta_path); 
    2030     if (sto_p->meta_path == NULL) 
    2031     { 
    2032         free(sto_p->data_path); 
    2033         free(sto_p); 
    2034         *error_p = -TROVE_ENOMEM; 
    2035         return NULL; 
    2036     } 
    20371922    sto_p->refct = 0; 
    20381923    sto_p->flags = flags; 
    20391924 
    2040     DBPF_GET_STO_ATTRIB_DBNAME(path_name, PATH_MAX, meta_path); 
     1925    DBPF_GET_STO_ATTRIB_DBNAME(path_name, PATH_MAX, stoname); 
    20411926 
    20421927    /* we want to stat the attrib db first in case it doesn't 
     
    20491934    } 
    20501935 
    2051     sto_p->sto_attr_db = dbpf_db_open(path_name, NULL, 
     1936    sto_p->sto_attr_db = dbpf_db_open(sto_p->name, path_name, NULL, 
    20521937                                      error_p, NULL, 0); 
    20531938    if (sto_p->sto_attr_db == NULL) 
    20541939    { 
    2055         free(sto_p->meta_path); 
    2056                 free(sto_p->data_path); 
     1940        free(sto_p->name); 
    20571941        free(sto_p); 
    20581942        my_storage_p = NULL; 
     
    20601944    } 
    20611945 
    2062     DBPF_GET_COLLECTIONS_DBNAME(path_name, PATH_MAX, meta_path); 
    2063  
    2064     sto_p->coll_db = dbpf_db_open(path_name, NULL,  
     1946    DBPF_GET_COLLECTIONS_DBNAME(path_name, PATH_MAX, stoname); 
     1947 
     1948    sto_p->coll_db = dbpf_db_open(sto_p->name, path_name, NULL,  
    20651949                                  error_p, NULL, DB_RECNUM); 
    20661950    if (sto_p->coll_db == NULL) 
    20671951    { 
    20681952        db_close(sto_p->sto_attr_db); 
    2069         free(sto_p->meta_path); 
    2070                 free(sto_p->data_path); 
     1953        free(sto_p->name); 
    20711954        free(sto_p); 
    20721955        my_storage_p = NULL; 
     
    22052088 * a db plus files storage region. 
    22062089 */ 
    2207 static int dbpf_db_create(char *dbname, 
     2090static int dbpf_db_create(const char *sto_path, 
     2091                          char *dbname, 
    22082092                          DB_ENV *envp, 
    22092093                          uint32_t flags) 
     
    22482132 */ 
    22492133static DB *dbpf_db_open( 
    2250     char *dbname, DB_ENV *envp, int *error_p, 
     2134    const char *sto_path, char *dbname, DB_ENV *envp, int *error_p, 
    22512135    int (*compare_fn) (DB *db, const DBT *dbt1, const DBT *dbt2), 
    22522136    uint32_t flags) 
  • trunk/src/io/trove/trove-dbpf/dbpf-open-cache.c

    r7952 r7958  
    428428 
    429429    DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX, 
    430                               my_storage_p->data_path, coll_id, llu(handle)); 
     430                              my_storage_p->name, coll_id, llu(handle)); 
    431431 
    432432    ret = fast_unlink(filename, coll_id, handle); 
     
    460460 
    461461    DBPF_GET_BSTREAM_FILENAME(filename, PATH_MAX, 
    462                               my_storage_p->data_path, coll_id, llu(handle)); 
     462                              my_storage_p->name, coll_id, llu(handle)); 
    463463 
    464464    gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG, 
     
    548548    } 
    549549    DBPF_GET_STRANDED_BSTREAM_FILENAME(tmp_item->pathname, PATH_MAX, 
    550                                        my_storage_p->data_path,  
     550                                       my_storage_p->name,  
    551551                                       coll_id, 
    552552                                       llu(handle)); 
  • trunk/src/io/trove/trove-dbpf/dbpf.h

    r7952 r7958  
    6969((__handle) % DBPF_BSTREAM_MAX_NUM_BUCKETS) 
    7070 
    71 #define DBPF_GET_DATA_DIRNAME(__buf, __path_max, __base)                 \ 
    72 do { snprintf(__buf, __path_max, "/%s", __base); } while (0) 
    73  
    74 #define DBPF_GET_META_DIRNAME(__buf, __path_max, __base)                 \ 
    75 do { snprintf(__buf, __path_max, "/%s", __base); } while (0) 
     71#define DBPF_GET_STORAGE_DIRNAME(__buf, __path_max, __stoname)          \ 
     72do { snprintf(__buf, __path_max, "/%s", __stoname); } while (0) 
    7673 
    7774#define STO_ATTRIB_DBNAME "storage_attributes.db" 
    78 #define DBPF_GET_STO_ATTRIB_DBNAME(__buf, __path_max, __base)            \ 
     75#define DBPF_GET_STO_ATTRIB_DBNAME(__buf, __path_max, __stoname)         \ 
    7976do {                                                                     \ 
    80   snprintf(__buf, __path_max, "/%s/%s", __base, STO_ATTRIB_DBNAME);      \ 
     77  snprintf(__buf, __path_max, "/%s/%s", __stoname, STO_ATTRIB_DBNAME);   \ 
    8178} while (0) 
    8279 
    8380#define COLLECTIONS_DBNAME "collections.db" 
    84 #define DBPF_GET_COLLECTIONS_DBNAME(__buf, __path_max, __base)           \ 
     81#define DBPF_GET_COLLECTIONS_DBNAME(__buf, __path_max, __stoname)        \ 
    8582do {                                                                     \ 
    86   snprintf(__buf, __path_max, "/%s/%s", __base, COLLECTIONS_DBNAME);     \ 
     83  snprintf(__buf, __path_max, "/%s/%s", __stoname, COLLECTIONS_DBNAME);  \ 
    8784} while (0) 
    8885 
    89 #define DBPF_GET_COLL_DIRNAME(__buf, __path_max, __base, __collid)       \ 
     86#define DBPF_GET_COLL_DIRNAME(__buf, __path_max, __stoname, __collid)    \ 
    9087do {                                                                     \ 
    91   snprintf(__buf, __path_max, "/%s/%08x", __base, __collid);             \ 
     88  snprintf(__buf, __path_max, "/%s/%08x", __stoname, __collid);          \ 
    9289} while (0) 
    9390 
    9491#define COLL_ATTRIB_DBNAME "collection_attributes.db" 
    95 #define DBPF_GET_COLL_ATTRIB_DBNAME(__buf,__path_max,__base,__collid)    \ 
     92#define DBPF_GET_COLL_ATTRIB_DBNAME(__buf,__path_max,__stoname,__collid) \ 
    9693do {                                                                     \ 
    97   snprintf(__buf, __path_max, "/%s/%08x/%s", __base, __collid,           \ 
     94  snprintf(__buf, __path_max, "/%s/%08x/%s", __stoname, __collid,        \ 
    9895           COLL_ATTRIB_DBNAME);                                          \ 
    9996} while (0) 
    10097 
    10198#define DS_ATTRIB_DBNAME "dataspace_attributes.db" 
    102 #define DBPF_GET_DS_ATTRIB_DBNAME(__buf,__path_max,__base,__collid)      \ 
     99#define DBPF_GET_DS_ATTRIB_DBNAME(__buf,__path_max,__stoname,__collid)   \ 
    103100do {                                                                     \ 
    104   snprintf(__buf, __path_max, "/%s/%08x/%s", __base, __collid,           \ 
     101  snprintf(__buf, __path_max, "/%s/%08x/%s", __stoname, __collid,        \ 
    105102           DS_ATTRIB_DBNAME);                                            \ 
    106103} while (0) 
    107104 
    108105#define BSTREAM_DIRNAME "bstreams" 
    109 #define DBPF_GET_BSTREAM_DIRNAME(__buf, __path_max, __base, __collid)    \ 
     106#define DBPF_GET_BSTREAM_DIRNAME(__buf, __path_max, __stoname, __collid) \ 
    110107do {                                                                     \ 
    111   snprintf(__buf, __path_max, "/%s/%08x/%s", __base, __collid,           \ 
     108  snprintf(__buf, __path_max, "/%s/%08x/%s", __stoname, __collid,        \ 
    112109           BSTREAM_DIRNAME);                                             \ 
    113110} while (0) 
     
    115112#define STRANDED_BSTREAM_DIRNAME "stranded-bstreams" 
    116113#define DBPF_GET_STRANDED_BSTREAM_DIRNAME(                       \ 
    117         __buf, __path_max, __base, __collid)                     \ 
     114        __buf, __path_max, __stoname, __collid)                  \ 
    118115    do {                                                         \ 
    119116        snprintf(__buf, __path_max, "/%s/%08x/%s",               \ 
    120                  __base, __collid, STRANDED_BSTREAM_DIRNAME);    \ 
     117                 __stoname, __collid, STRANDED_BSTREAM_DIRNAME); \ 
    121118    } while(0) 
    122119 
    123 /* arguments are: buf, path_max, base, collid, handle */ 
    124 #define DBPF_GET_BSTREAM_FILENAME(__b, __pm, __base, __cid, __handle)     \ 
     120/* arguments are: buf, path_max, stoname, collid, handle */ 
     121#define DBPF_GET_BSTREAM_FILENAME(__b, __pm, __stoname, __cid, __handle)  \ 
    125122do {                                                                      \ 
    126123  snprintf(__b, __pm, "/%s/%08x/%s/%.8llu/%08llx.bstream",                \ 
    127            __base, __cid, BSTREAM_DIRNAME,                                \ 
     124           __stoname, __cid, BSTREAM_DIRNAME,                             \ 
    128125           llu(DBPF_BSTREAM_GET_BUCKET(__handle)), llu(__handle));        \ 
    129126} while (0) 
    130127 
    131 /* arguments are: buf, path_max, base, collid, handle */ 
     128/* arguments are: buf, path_max, stoname, collid, handle */ 
    132129#define DBPF_GET_STRANDED_BSTREAM_FILENAME(                  \ 
    133         __b, __pm, __base, __cid, __handle)                  \ 
     130        __b, __pm, __stoname, __cid, __handle)               \ 
    134131    do {                                                     \ 
    135132        snprintf(__b, __pm, "/%s/%08x/%s/%08llx.bstream",    \ 
    136                  __base, __cid, STRANDED_BSTREAM_DIRNAME,    \ 
     133                 __stoname, __cid, STRANDED_BSTREAM_DIRNAME, \ 
    137134                 llu(__handle));                             \ 
    138135    } while(0) 
    139136 
    140 /* arguments are: buf, path_max, base, collid */ 
     137/* arguments are: buf, path_max, stoname, collid */ 
    141138#define KEYVAL_DBNAME "keyval.db" 
    142 #define DBPF_GET_KEYVAL_DBNAME(__buf,__path_max,__base,__collid)         \ 
     139#define DBPF_GET_KEYVAL_DBNAME(__buf,__path_max,__stoname,__collid)      \ 
    143140do {                                                                     \ 
    144   snprintf(__buf, __path_max, "/%s/%08x/%s", __base, __collid,           \ 
     141  snprintf(__buf, __path_max, "/%s/%08x/%s", __stoname, __collid,        \ 
    145142           KEYVAL_DBNAME);                                               \ 
    146143} while (0) 
     
    201198    TROVE_ds_flags flags; 
    202199    int refct; 
    203     char *data_path;   /* path to data storage directory */ 
    204     char *meta_path;   /* path to metadata storage directory */ 
     200    char *name; 
    205201    DB *sto_attr_db; 
    206202    DB *coll_db; 
     
    211207    int refct; 
    212208    char *name; 
    213     char *data_path;  /* path to data collection directory */ 
    214     char *meta_path;  /* path to metadata collection directory */ 
     209    char *path_name; 
    215210    DB *coll_attr_db; 
    216211    DB *ds_db; 
     
    695690 
    696691struct dbpf_storage *dbpf_storage_lookup( 
    697     char *data_path, char *meta_path, int *error_p, TROVE_ds_flags flags); 
    698  
    699 int dbpf_storage_create(char *data_path, 
    700                         char *meta_path, 
     692    char *stoname, int *error_p, TROVE_ds_flags flags); 
     693 
     694int dbpf_storage_create(char *stoname, 
    701695                        void *user_ptr, 
    702696                        TROVE_op_id *out_op_id_p); 
    703697 
    704 int dbpf_storage_remove(char *data_path, 
    705                         char *meta_path, 
     698int dbpf_storage_remove(char *stoname, 
    706699                        void *user_ptr, 
    707700                        TROVE_op_id *out_op_id_p); 
  • trunk/src/io/trove/trove-internal.h

    r7952 r7958  
    390390{ 
    391391    int (*initialize)( 
    392                       char *data_path, 
    393                       char *meta_path, 
     392                      char *stoname, 
    394393                      TROVE_ds_flags flags); 
    395394     
     
    397396     
    398397    int (*storage_create)( 
    399                           char *data_path, 
    400                           char *meta_path, 
     398                          char *stoname, 
    401399                          void *user_ptr, 
    402400                          TROVE_op_id *out_op_id_p); 
    403401     
    404402    int (*storage_remove)( 
    405                           char *data_path, 
    406                           char *meta_path, 
     403                          char *stoname, 
    407404                          void *user_ptr, 
    408405                          TROVE_op_id *out_op_id_p); 
    409406     
    410407    int (*collection_create)( 
     408                             /* char *stoname, */ 
    411409                             char *collname, 
    412410                             TROVE_coll_id new_coll_id, 
     
    415413 
    416414    int (*collection_remove)( 
     415                             /* char *stoname, */ 
    417416                             char *collname, 
    418417                             void *user_ptr, 
     
    420419     
    421420    int (*collection_lookup)( 
     421                             /* char *stoname, */ 
    422422                             char *collname, 
    423423                             TROVE_coll_id *coll_id_p, 
  • trunk/src/io/trove/trove-mgmt.c

    r7952 r7958  
    8888int trove_initialize(TROVE_method_id method_id, 
    8989                     TROVE_method_callback method_callback, 
    90                      char *data_path, 
    91                                  char *meta_path, 
     90                     char *stoname, 
    9291                     TROVE_ds_flags flags) 
    9392{ 
     
    121120    */ 
    122121    ret = mgmt_method_table[method_id]->initialize( 
    123         data_path, meta_path, flags); 
     122        stoname, flags); 
    124123    if (ret > -1) 
    125124    { 
     
    156155 
    157156int trove_storage_create(TROVE_method_id method_id, 
    158                          char *data_path, 
    159                                                  char *meta_path, 
     157                         char *stoname, 
    160158                         void *user_ptr, 
    161159                         TROVE_op_id *out_op_id_p) 
    162160{ 
    163161    int ret = mgmt_method_table[method_id]->storage_create( 
    164                   data_path, meta_path, user_ptr, out_op_id_p); 
     162        stoname, user_ptr, out_op_id_p); 
    165163 
    166164    return ((ret < 0) ? ret : 1); 
     
    169167 
    170168int trove_storage_remove(TROVE_method_id method_id, 
    171                          char *data_path, 
    172                                                  char *meta_path, 
     169                         char *stoname, 
    173170                         void *user_ptr, 
    174171                         TROVE_op_id *out_op_id_p) 
    175172{ 
    176173    int ret = mgmt_method_table[method_id]->storage_remove( 
    177                   data_path, meta_path, user_ptr, out_op_id_p); 
     174        stoname, user_ptr, out_op_id_p); 
    178175 
    179176    return ((ret < 0) ? ret : 1); 
  • trunk/src/io/trove/trove-migrate.c

    r7952 r7958  
    4343 * Prototypes 
    4444 */ 
    45 static int migrate_collection_0_1_3 (TROVE_coll_id coll_id, 
    46                                      const char* data_path, 
    47                                      const char* meta_path); 
     45static int migrate_collection_0_1_3 (TROVE_coll_id coll_id,const char* stoname); 
    4846 
    4947/* 
     
    5755    int minor; 
    5856    int incremental; 
    59     int (*migrate)(TROVE_coll_id coll_id, 
    60                  const char* data_path, 
    61                  const char* meta_path); 
     57    int (*migrate)(TROVE_coll_id coll_id, const char* stoname); 
    6258}; 
    6359 
     
    248244 * trove_migrate 
    249245 *   method_id - method used to for trove access 
    250  *   data_path - path to data storage 
    251  *   meta_path - path to metadata storage 
     246 *   stoname   - path to storage 
    252247 * 
    253248 * Iterate over all collections and migrate each one. 
    254249 * \return 0 on success, non-zero on failure 
    255250 */ 
    256 int trove_migrate (TROVE_method_id method_id, const char* data_path, 
    257                    const char* meta_path) 
     251int trove_migrate (TROVE_method_id method_id, const char* stoname) 
    258252{ 
    259253    TROVE_ds_position pos; 
     
    329323                               migrate_p->minor, 
    330324                               migrate_p->incremental); 
    331                     ret = migrate_p->migrate(coll_id, data_path, meta_path); 
     325                    ret = migrate_p->migrate(coll_id, stoname); 
    332326                    if (ret < 0) 
    333327                    { 
    334328                        gossip_err("migrate failed: \ 
    335 ret=%d coll=%d metadir=%s datadir=%s major=%d minor=%d incremental=%d\n", 
    336                                    ret, coll_id, meta_path, data_path, 
    337                                    migrate_p->major, migrate_p->minor,  
    338                                    migrate_p->incremental); 
     329ret=%d coll=%d stoname=%s major=%d minor=%d incremental=%d\n", 
     330                                   ret, coll_id, stoname, migrate_p->major, 
     331                                   migrate_p->minor, migrate_p->incremental); 
    339332                        goto complete; 
    340333                    } 
     
    386379/* 
    387380 * migrate_collection_0_1_3 
    388  *   coll_id   - collection id 
    389  *   data_path - path to data storage 
    390  *   meta_path - path to metadata storage 
     381 *   coll_id - collection id 
     382 *   stoname - path to storage 
    391383 * 
    392384 * For each datafile handle, check the file length and update the 
     
    394386 * \return 0 on success, non-zero on failure 
    395387 */ 
    396 static int migrate_collection_0_1_3 (TROVE_coll_id coll_id,  
    397                                      const char* data_path, 
    398                                      const char* meta_path) 
     388static int migrate_collection_0_1_3 (TROVE_coll_id coll_id, const char* stoname) 
    399389{ 
    400390    TROVE_context_id  context_id = PVFS_CONTEXT_NULL; 
     
    560550                DBPF_GET_BSTREAM_FILENAME(filename, 
    561551                                          PATH_MAX, 
    562                                           data_path, 
     552                                          stoname, 
    563553                                          coll_id, 
    564554                                          llu(handles[i])); 
  • trunk/src/io/trove/trove.h

    r7952 r7958  
    100100    TROVE_method_id method_id, 
    101101    TROVE_method_callback method_callback, 
    102     char *data_path, 
    103     char *meta_path, 
     102    char *stoname, 
    104103    TROVE_ds_flags flags); 
    105104 
    106105int trove_finalize(TROVE_method_id method_id); 
    107106 
    108 int trove_migrate(TROVE_method_id method_id, const char* data_path, 
    109                   const char* meta_path); 
     107int trove_migrate(TROVE_method_id method_id, const char* stoname); 
    110108 
    111109int trove_open_context( 
     
    123121int trove_storage_create( 
    124122    TROVE_method_id method_id, 
    125     char *data_path, 
    126     char *meta_path, 
     123    char *stoname, 
    127124    void *user_ptr, 
    128125    TROVE_op_id *out_op_id_p); 
     
    130127int trove_storage_remove( 
    131128    TROVE_method_id method_id, 
    132     char *data_path, 
    133     char *meta_path, 
     129    char *stoname, 
    134130    void *user_ptr, 
    135131    TROVE_op_id *out_op_id_p); 
    136132 
    137133int trove_collection_create( 
     134/* char *stoname, */ 
    138135    char *collname, 
    139136    TROVE_coll_id new_coll_id, 
     
    143140int trove_collection_remove( 
    144141    TROVE_method_id method_id, 
     142/* char *stoname, */ 
    145143    char *collname, 
    146144    void *user_ptr, 
     
    149147int trove_collection_lookup( 
    150148    TROVE_method_id method_id, 
     149/* char *stoname, */ 
    151150    char *collname, 
    152151    TROVE_coll_id *out_coll_id_p, 
  • trunk/src/proto/endecode-funcs.h

    r7952 r7958  
    110110        *(pptr) += roundup8(4 + len + 1); \ 
    111111    } else { \ 
    112         *(u_int32_t *) *(pptr) = 0; \ 
     112        *(u_int32_t *) (*(pptr)+4) = 0; \ 
    113113        *(pptr) += 8; \ 
    114114    } \ 
  • trunk/src/server/pvfs2-server.c

    r7952 r7958  
    788788        server_config.trove_method,  
    789789        trove_coll_to_method_callback, 
    790         server_config.data_path, 
    791                 server_config.meta_path, 
     790        server_config.storage_path, 
    792791        init_flags); 
    793792    if (ret < 0) 
     
    796795 
    797796        gossip_err("\n***********************************************\n"); 
    798         gossip_err("Invalid Storage Space: %s or %s\n\n", 
    799                    server_config.data_path, server_config.meta_path); 
     797        gossip_err("Invalid Storage Space: %s\n\n", 
     798                   server_config.storage_path); 
    800799        gossip_err("Storage initialization failed.  The most " 
    801800                   "common reason\nfor this is that the storage space " 
     
    10891088     * Migrate database if needed 
    10901089     */ 
    1091     ret = trove_migrate(server_config.trove_method, 
    1092                         server_config.data_path, 
    1093                         server_config.meta_path); 
     1090    ret = trove_migrate(server_config.trove_method,server_config.storage_path); 
    10941091    if (ret < 0) 
    10951092    { 
  • trunk/test/automated/README.tests

    r7952 r7958  
    11# 
    2 # $Date: 2009-09-01 18:55:53 $ 
     2# $Date: 2009-09-02 21:10:42 $ 
    33# 
    44# A brief description of the contents of the test/automated directory 
  • trunk/test/io/buffer/trove-init.c

    r7952 r7958  
    7272 
    7373    ret = trove_initialize( 
    74         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     74        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    7575    if (ret < 0) { 
    7676        fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/flow/test-bmi-cache-server.c

    r7952 r7958  
    103103 
    104104    ret = trove_initialize( 
    105         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     105        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    106106    if (ret < 0) 
    107107    { 
  • trunk/test/io/flow/test-harness-server-trove.c

    r7952 r7958  
    108108 
    109109    ret = trove_initialize( 
    110         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     110        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    111111    if (ret < 0) 
    112112    { 
  • trunk/test/io/flow/test1-server.c

    r7952 r7958  
    105105 
    106106    ret = trove_initialize( 
    107         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     107        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    108108    if (ret < 0) 
    109109    { 
  • trunk/test/io/job/job-client-example.c

    r7952 r7958  
    5252 
    5353        ret = trove_initialize( 
    54             TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", "/tmp/pvfs2-test-space", 0); 
     54            TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", 0); 
    5555        if(ret < 0) 
    5656        { 
  • trunk/test/io/job/job-server-example.c

    r7952 r7958  
    5757 
    5858        ret = trove_initialize( 
    59             TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", "/tmp/pvfs2-test-space", 0); 
     59            TROVE_METHOD_DBPF, NULL, "/tmp/pvfs2-test-space", 0); 
    6060        if(ret < 0) 
    6161        { 
  • trunk/test/io/job/module.mk.in

    r7952 r7958  
    66        $(DIR)/job-server-example.c \ 
    77        $(DIR)/trove-job-create-toy.c \ 
    8         $(DIR)/trove-job-io.c \ 
    98        $(DIR)/trove-job-ls.c \ 
    109        $(DIR)/trove-job-mkfs.c \ 
  • trunk/test/io/job/trove-job-create-toy.c

    r7952 r7958  
    4040 
    4141    ret = trove_initialize( 
    42         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     42        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4343    if (ret < 0) { 
    4444        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/job/trove-job-ls.c

    r7952 r7958  
    4848 
    4949    ret = trove_initialize( 
    50         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     50        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    5151    if (ret < 0) { 
    5252        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/job/trove-job-mkfs.c

    r7952 r7958  
    7272    /* try to initialize; fails if storage space isn't there? */ 
    7373    ret = trove_initialize( 
    74         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     74        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    7575    if (ret < 0) { 
    7676        fprintf(stderr, "warning: initialize failed.  trying to create storage space.\n"); 
     
    7979        /* Q: what good is the op_id here if we have to match on coll_id in test fn? */ 
    8080        ret = trove_storage_create( 
    81             TROVE_METHOD_DBPF, storage_space, storage_space, NULL, &op_id); 
     81            TROVE_METHOD_DBPF, storage_space, NULL, &op_id); 
    8282        if (ret < 0) { 
    8383            fprintf(stderr, "storage create failed.\n"); 
     
    8787        /* second try at initialize, in case it failed first try. */ 
    8888        ret = trove_initialize( 
    89             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     89            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    9090        if (ret < 0) { 
    9191            fprintf(stderr, "initialized failed second time.\n"); 
  • trunk/test/io/job/trove-job-touch.c

    r7952 r7958  
    4444 
    4545    ret = trove_initialize( 
    46         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     46        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4747    if (ret < 0) { 
    4848        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/test-listio.c

    r7952 r7958  
    7676 
    7777        ret = trove_initialize( 
    78             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     78            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    7979        if (ret < 0) { 
    8080            fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/test-listio2.c

    r7952 r7958  
    8080 
    8181        ret = trove_initialize( 
    82             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     82            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    8383        if (ret < 0) { 
    8484            fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/test-listio3.c

    r7952 r7958  
    7979 
    8080        ret = trove_initialize( 
    81             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     81            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    8282        if (ret < 0) { 
    8383            fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/test-listio4.c

    r7952 r7958  
    7979 
    8080        ret = trove_initialize( 
    81             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     81            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    8282        if (ret < 0) { 
    8383            fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/test-listio5.c

    r7952 r7958  
    8484 
    8585        ret = trove_initialize( 
    86             TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     86            TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    8787        if (ret < 0) { 
    8888            fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/test-trove-cancel.c

    r7952 r7958  
    7979 
    8080    ret = trove_initialize( 
    81         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     81        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    8282    if (ret < 0) { 
    8383        fprintf(stderr, "initialize failed: run trove-mkfs first.\n"); 
  • trunk/test/io/trove/trove-bstream.c

    r7952 r7958  
    4444 
    4545    ret = trove_initialize( 
    46         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     46        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4747    if (ret < 0 ) { 
    4848        fprintf(stderr, "initialize failed\n"); 
  • trunk/test/io/trove/trove-create-stress.c

    r7952 r7958  
    4747 
    4848    ret = trove_initialize( 
    49         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     49        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    5050    if (ret < 0) { 
    5151        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-export.c

    r7952 r7958  
    5353 
    5454    ret = trove_initialize( 
    55         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     55        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    5656    if (ret < 0) { 
    5757        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-import.c

    r7952 r7958  
    5858 
    5959    ret = trove_initialize( 
    60         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     60        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    6161    if (ret < 0) { 
    6262        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-key-iterate.c

    r7952 r7958  
    126126 
    127127    ret = trove_initialize( 
    128         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     128        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    129129    if (ret < 0) { 
    130130        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-ls.c

    r7952 r7958  
    4747 
    4848    ret = trove_initialize( 
    49         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     49        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    5050    if (ret < 0) { 
    5151        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-mkdir.c

    r7952 r7958  
    4545         
    4646    ret = trove_initialize( 
    47         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     47        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4848    if (ret < 0) { 
    4949        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-mkfs.c

    r7952 r7958  
    3737 
    3838    /* try to initialize; fails if storage space isn't there? */ 
    39     ret = trove_initialize(TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     39    ret = trove_initialize(TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4040    if (ret < 0) { 
    4141        fprintf(stderr, "warning: initialize failed.  trying to create storage space.\n"); 
     
    4343        /* create the storage space */ 
    4444        /* Q: what good is the op_id here if we have to match on coll_id in test fn? */ 
    45         ret = trove_storage_create(TROVE_METHOD_DBPF, storage_space, storage_space, NULL, &op_id); 
     45        ret = trove_storage_create(TROVE_METHOD_DBPF, storage_space, NULL, &op_id); 
    4646        if (ret < 0) { 
    4747            fprintf(stderr, "storage create failed.\n"); 
     
    5050 
    5151        /* second try at initialize, in case it failed first try. */ 
    52         ret = trove_initialize(TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     52        ret = trove_initialize(TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    5353        if (ret < 0) { 
    5454            fprintf(stderr, "initialized failed second time.\n"); 
  • trunk/test/io/trove/trove-rm.c

    r7952 r7958  
    4242 
    4343    ret = trove_initialize( 
    44         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     44        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4545    if (ret < 0) { 
    4646        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-rmdir.c

    r7952 r7958  
    4242 
    4343    ret = trove_initialize( 
    44         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     44        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4545    if (ret < 0) { 
    4646        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/io/trove/trove-touch.c

    r7952 r7958  
    4444 
    4545    ret = trove_initialize( 
    46         TROVE_METHOD_DBPF, NULL, storage_space, storage_space, 0); 
     46        TROVE_METHOD_DBPF, NULL, storage_space, 0); 
    4747    if (ret < 0) { 
    4848        fprintf(stderr, "initialize failed.\n"); 
  • trunk/test/server/showconfig.c

    r7952 r7958  
    4343    fprintf(stderr,"Server ID                : %s\n", 
    4444            serverconfig.host_id); 
    45     fprintf(stderr,"Data Storage Space            : %s\n", 
    46             serverconfig.data_path); 
    47     fprintf(stderr,"Meta Storage Space            : %s\n", 
    48             serverconfig.meta_path); 
     45    fprintf(stderr,"Storage Space            : %s\n", 
     46            serverconfig.storage_path); 
    4947    fprintf(stderr,"FS Config File Name      : %s (%d bytes)\n", 
    5048            serverconfig.fs_config_filename,