Changeset 8484
- Timestamp:
- 08/27/10 13:26:39 (3 years ago)
- Location:
- branches/Orange-Branch/src/server
- Files:
-
- 3 modified
-
precreate-pool-refiller.sm (modified) (1 diff)
-
pvfs2-server.c (modified) (6 diffs)
-
pvfs2-server.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/Orange-Branch/src/server/precreate-pool-refiller.sm
r8476 r8484 193 193 s_op->u.precreate_pool_refiller.type, 194 194 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, 196 196 NULL); 197 197 198 198 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; 200 200 msg_p->retry_flag = PVFS_MSGPAIR_RETRY; 201 201 msg_p->comp_fn = batch_create_comp_fn; -
branches/Orange-Branch/src/server/pvfs2-server.c
r8476 r8484 2248 2248 int handle_count = 0; 2249 2249 int fs_count = 0; 2250 unsigned int types_to_pool = 0; 2250 2251 struct server_configuration_s *user_opts = get_server_config_struct(); 2251 2252 assert(user_opts); … … 2283 2284 } 2284 2285 2285 /* how many I/Oservers do we have? */2286 /* how many servers do we have? */ 2286 2287 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); 2288 2289 if(ret < 0) 2289 2290 { … … 2303 2304 /* resolve addrs for each I/O server */ 2304 2305 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, 2306 2307 addr_array, &server_count); 2307 2308 if(ret < 0) … … 2320 2321 /* this is a peer server */ 2321 2322 /* 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++ ) 2323 2342 { 2324 2343 PVFS_ds_type t; 2325 2344 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)); 2326 2361 ret = precreate_pool_setup_server(host, t, 2327 2362 cur_fs->coll_id, &pool_handle); … … 2570 2605 * fsid: the filesystem ID of the fs the pool refiller is associated with 2571 2606 * 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. 2572 2611 */ 2573 2612 static int precreate_pool_launch_refiller(const char* host, PVFS_ds_type type, … … 2606 2645 } 2607 2646 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); 2611 2654 if(ret < 0) 2612 2655 { -
branches/Orange-Branch/src/server/pvfs2-server.h
r8476 r8484 472 472 char* host; 473 473 PVFS_BMI_addr_t host_addr; 474 PVFS_handle_extent_array data_handle_extent_array;474 PVFS_handle_extent_array handle_extent_array; 475 475 PVFS_ds_type type; 476 476 };
