Changeset 8484

Show
Ignore:
Timestamp:
08/27/10 13:26:39 (3 years ago)
Author:
mtmoore
Message:

update to multiple pre-create pool implementation, only create pools for servers of the types they have to give (no I/O handles from meta only servers)

Location:
branches/Orange-Branch/src/server
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/src/server/precreate-pool-refiller.sm

    r8476 r8484  
    193193        s_op->u.precreate_pool_refiller.type, 
    194194        user_opts->precreate_batch_size[index], 
    195         s_op->u.precreate_pool_refiller.data_handle_extent_array, 
     195        s_op->u.precreate_pool_refiller.handle_extent_array, 
    196196        NULL); 
    197197 
    198198    msg_p->fs_id = s_op->u.precreate_pool_refiller.fsid; 
    199     msg_p->handle = s_op->u.precreate_pool_refiller.data_handle_extent_array.extent_array[0].first; 
     199    msg_p->handle = s_op->u.precreate_pool_refiller.handle_extent_array.extent_array[0].first; 
    200200    msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 
    201201    msg_p->comp_fn = batch_create_comp_fn; 
  • branches/Orange-Branch/src/server/pvfs2-server.c

    r8476 r8484  
    22482248    int handle_count = 0; 
    22492249    int fs_count = 0; 
     2250    unsigned int types_to_pool = 0; 
    22502251    struct server_configuration_s *user_opts = get_server_config_struct(); 
    22512252    assert(user_opts); 
     
    22832284        } 
    22842285 
    2285         /* how many I/O servers do we have? */ 
     2286        /* how many servers do we have? */ 
    22862287        ret = PINT_cached_config_count_servers( 
    2287             cur_fs->coll_id, PINT_SERVER_TYPE_IO, &server_count); 
     2288            cur_fs->coll_id, PINT_SERVER_TYPE_ALL, &server_count); 
    22882289        if(ret < 0) 
    22892290        { 
     
    23032304        /* resolve addrs for each I/O server */ 
    23042305        ret = PINT_cached_config_get_server_array( 
    2305             cur_fs->coll_id, PINT_SERVER_TYPE_IO, 
     2306            cur_fs->coll_id, PINT_SERVER_TYPE_ALL, 
    23062307            addr_array, &server_count); 
    23072308        if(ret < 0) 
     
    23202321                /* this is a peer server */ 
    23212322                /* make sure a pool exists for that server,type, fsid pair */ 
    2322                 for( j=0; j < PVFS_DS_TYPE_COUNT; j++ ) 
     2323 
     2324                /* set ds type of handles to setup in the server's pool based 
     2325                 * on the server type */ 
     2326                types_to_pool = PVFS_TYPE_NONE; 
     2327                if( (server_type & PINT_SERVER_TYPE_IO) != 0 ) 
     2328                { 
     2329                        types_to_pool |= PVFS_TYPE_DATAFILE;  
     2330                } 
     2331                 
     2332                if( (server_type & PINT_SERVER_TYPE_META) != 0 ) 
     2333                { 
     2334                    types_to_pool |= (PVFS_TYPE_METAFILE | PVFS_TYPE_DIRECTORY | 
     2335                                      PVFS_TYPE_SYMLINK | PVFS_TYPE_DIRDATA | 
     2336                                      PVFS_TYPE_INTERNAL); 
     2337                } 
     2338 
     2339                /* for each possible bit in the ds_type mask check if we should 
     2340                 * create a pool for it */ 
     2341                for(j = 0; j < PVFS_DS_TYPE_COUNT; j++ ) 
    23232342                { 
    23242343                    PVFS_ds_type t; 
    23252344                    int_to_PVFS_ds_type(j, &t); 
     2345                     
     2346                    /* skip setting up a pool when it doesn't make sense i.e.  
     2347                     * when the remote host doesn't have handle types we want. 
     2348                     * or in the special case that we don't get TYPE_NONE  
     2349                     * handles from  IO servers*/ 
     2350                    if(((t & types_to_pool) == 0 ) || 
     2351                       ((t == PVFS_TYPE_NONE) &&  
     2352                        (server_type == PINT_SERVER_TYPE_IO)) ) 
     2353                    { 
     2354                        continue; 
     2355                    } 
     2356 
     2357                    gossip_debug(GOSSIP_SERVER_DEBUG, "%s: setting up pool on " 
     2358                                 "%s, type: %u, fs_id: %llu, handle: %llu\n", 
     2359                                 __func__, host, t, llu(cur_fs->coll_id),  
     2360                                 llu(pool_handle)); 
    23262361                    ret = precreate_pool_setup_server(host, t,  
    23272362                        cur_fs->coll_id, &pool_handle); 
     
    25702605 *    fsid: the filesystem ID of the fs the pool refiller is associated with 
    25712606 *    pool_handle: the handle of the pool itself 
     2607 * 
     2608 *    This will only be called for a host/type that matches and needs a filler 
     2609 *    so a remote server that is I/O only will only get refillers for datafile 
     2610 *    handles. 
    25722611 */ 
    25732612static int precreate_pool_launch_refiller(const char* host, PVFS_ds_type type, 
     
    26062645    } 
    26072646 
    2608     ret = PINT_cached_config_get_server( 
    2609         fsid, host, PINT_SERVER_TYPE_IO,  
    2610         &s_op->u.precreate_pool_refiller.data_handle_extent_array); 
     2647    /* set this refillers handle range based on the type of handle it will  
     2648     * hold. If it's a datafile get an IO server range, otherwise get a meta 
     2649     * range. */ 
     2650    ret = PINT_cached_config_get_server( fsid, host,  
     2651              ((type == PVFS_TYPE_DATAFILE) ? PINT_SERVER_TYPE_IO :  
     2652                                              PINT_SERVER_TYPE_META), 
     2653              &s_op->u.precreate_pool_refiller.handle_extent_array); 
    26112654    if(ret < 0) 
    26122655    { 
  • branches/Orange-Branch/src/server/pvfs2-server.h

    r8476 r8484  
    472472    char* host; 
    473473    PVFS_BMI_addr_t host_addr; 
    474     PVFS_handle_extent_array data_handle_extent_array; 
     474    PVFS_handle_extent_array handle_extent_array; 
    475475    PVFS_ds_type type; 
    476476};